JS: Update range analysis to use getImmediatePredecessor

This commit is contained in:
Asger F
2019-07-31 20:35:56 +01:00
parent 9e949d0f44
commit 8e1893d0ed
2 changed files with 17 additions and 28 deletions

View File

@@ -0,0 +1,11 @@
function defaultParam(param = 0) {
if (param > 0) {} // OK
}
function defaultPattern(obj, arr) {
let { prop = 0 } = obj;
if (prop > 0) {} // OK
let [ elm = 0 ] = arr;
if (elm > 0) {} // OK
}