refactor($parse): improve readability on conditional assignment
Use logical OR operator instead of if statement Closes #5065
This commit is contained in:
committed by
Peter Bacon Darwin
parent
3e82492fc6
commit
49b2a1c8cf
+1
-5
@@ -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 === '\\') {
|
||||
|
||||
Reference in New Issue
Block a user