Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 345ed5d

Browse files
dimircpetebacondarwin
authored andcommitted
refactor($parse): improve readability on conditional assignment
Use logical OR operator instead of if statement Closes #5065
1 parent 64b1773 commit 345ed5d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/ng/parse.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,7 @@ Lexer.prototype = {
348348
string += String.fromCharCode(parseInt(hex, 16));
349349
} else {
350350
var rep = ESCAPE[ch];
351-
if (rep) {
352-
string += rep;
353-
} else {
354-
string += ch;
355-
}
351+
string = string + (rep || ch);
356352
}
357353
escape = false;
358354
} else if (ch === '\\') {

0 commit comments

Comments
 (0)