From b4341743573f2f76794b54b97ad4d816075fd16b Mon Sep 17 00:00:00 2001 From: Wladimir Coka Date: Thu, 21 Nov 2013 16:37:35 -0500 Subject: [PATCH] refactor($parse): improve readability on conditional assignment Use logical OR operator instead of if statement Closes #5065 --- src/ng/parse.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/ng/parse.js b/src/ng/parse.js index 97721f4e28a3..ba854dc1798d 100644 --- a/src/ng/parse.js +++ b/src/ng/parse.js @@ -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 === '\\') {