LiveScratchpad
LiveScratchpad copied to clipboard
Errors on nightly with code using ternary operators
After a bit of hacking, livescratchpad mode becomes unresponsive. When evaluation happens I get this in the JS console:
Timestamp: 12-05-09 1:22:57 PM Error: TypeError: this["on" + aNode.type] is not a function Source File: chrome://livescratchpad/content/LiveEvaluator.jsm Line: 547
This happens when using ternary operators in statements like:
function main(n) {
var result = [];
for (var i = 0; i < 18; i++) {
var x = '';
i % 5 === 0 ? x = 'Buzz' : x = '';
result.push(x);
};
console.log(JSON.stringify(result, null, ' '));
}