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

Commit 49b2a1c

Browse files
dimircpetebacondarwin
authored andcommitted
refactor($parse): improve readability on conditional assignment
Use logical OR operator instead of if statement Closes #5065
1 parent 3e82492 commit 49b2a1c

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
@@ -361,11 +361,7 @@ Lexer.prototype = {
361361
string += String.fromCharCode(parseInt(hex, 16));
362362
} else {
363363
var rep = ESCAPE[ch];
364-
if (rep) {
365-
string += rep;
366-
} else {
367-
string += ch;
368-
}
364+
string = string + (rep || ch);
369365
}
370366
escape = false;
371367
} else if (ch === '\\') {

0 commit comments

Comments
 (0)