Ticket #88 (closed defect: fixed)
Missing "var" in chat.js
| Reported by: | bug | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Website | Version: | Orbited 0.6.0 |
| Keywords: | Cc: |
Description
Tried out the chat application, using IE7 in XP. I have Javascript error alerts turned on, and one came up. Went into the debugger and it had crashed on line 45 of chat.js with an error that object didn't support that property or method.
The code (with line number added) is:
irc.onCTCP = function(command) {
var messagediv = $('<div class="message"></div>');
messagediv.addClass("ctcp");
45-> message = command.args.slice(1).join(" ")
var sender = parseName(command.prefix);
messagediv.
html('<span class="user">' + sender + '(CTCP):</span> ' + sanitize(message)).
appendTo("#chathistory");
scrollDown();
}
message already has a value being a large object. Obviously there is a missing "var" before "message", as per other handlers.
Also posted to forum before I worked out how to post a bug.
Hugh