Skip to content

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 angular#5065
  • Loading branch information
dimirc authored and Cameron Knight committed Jul 16, 2014
1 parent 9f12c46 commit b434174
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 @@ -348,11 +348,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 b434174

Please sign in to comment.