Skip to content

Errors on nightly with code using ternary operators #3

@jeffgca

Description

@jeffgca

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, '  '));

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions