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

Commit

Permalink
refactor($parse): improve readability on conditional assignment
Browse files Browse the repository at this point in the history
Use logical OR operator instead of if statement

Closes #5065
  • Loading branch information
dimirc authored and petebacondarwin committed Jul 15, 2014
1 parent 3e82492 commit 49b2a1c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/ng/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 === '\\') {
Expand Down

0 comments on commit 49b2a1c

Please sign in to comment.