Skip to content

Commit f40cb39

Browse files
committed
simplify
1 parent 63e082d commit f40cb39

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/handlers.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,13 +1133,9 @@ const handlers = {
11331133
// TODO do we need to handle weird unicode characters somehow?
11341134
// str.replace(/\\u(\d{4})/g, (m, n) => String.fromCharCode(+n))
11351135

1136-
let value = node.raw;
1137-
if (value) {
1138-
state.commands.push(c(value, node));
1139-
return;
1140-
}
1141-
1142-
value = typeof node.value === 'string' ? quote(node.value, state.quote) : String(node.value);
1136+
const value =
1137+
node.raw ||
1138+
(typeof node.value === 'string' ? quote(node.value, state.quote) : String(node.value));
11431139

11441140
state.commands.push(c(value, node));
11451141
},

0 commit comments

Comments
 (0)