refactor($parse): improve readability on conditional assignment

Use logical OR operator instead of if statement

Closes #5065
This commit is contained in:
Wladimir Coka
2013-11-21 16:37:35 -05:00
committed by Peter Bacon Darwin
parent 3e82492fc6
commit 49b2a1c8cf
+1 -5
View File
@@ -361,11 +361,7 @@ Lexer.prototype = {
string += String.fromCharCode(parseInt(hex, 16));
} else {
var rep = ESCAPE[ch];
if (rep) {
string += rep;
} else {
string += ch;
}
string = string + (rep || ch);
}
escape = false;
} else if (ch === '\\') {