Fix no-multi-assign in ES5

[MAILPOET-1033]
This commit is contained in:
Pavel Dohnal
2017-08-16 10:44:33 +02:00
parent 89b51b6215
commit 27c6fa5ff4
5 changed files with 11 additions and 9 deletions

View File

@ -74,9 +74,10 @@ define(
// * Rinse & repeat.
for ( ; i <= keys_last; i++ ) {
key = keys[i] === '' ? cur.length : keys[i];
cur = cur[key] = i < keys_last
cur[key] = i < keys_last
? cur[key] || ( keys[i+1] && isNaN( keys[i+1] ) ? {} : [] )
: val;
cur = cur[key];
}
} else {