grasp icon indicating copy to clipboard operation
grasp copied to clipboard

Cannot read property 'nodes' of undefined (caused by switch ?)

Open ainthek opened this issue 8 years ago • 0 comments

function test() {

// unrem this and run: grasp 'if[consequent=:not(block)]' -r samples/if/s-query-problem.js 
// you will get Cannot read property 'nodes' of undefined
// switch (propName) { 
//     case "1":
//         return 1;
// }


if (propName)    // match
    return 0;
else {
    return 1;
}

if (propName){  // not match
    return 0;
}
else {
    return 1;
}

};

ainthek avatar Feb 02 '16 19:02 ainthek