Skip to content

Commit bbbd64d

Browse files
PoetroMadLittleMods
authored andcommitted
Less restricitive check for what can be before var(
1 parent 44107a2 commit bbbd64d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resolve-value.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function balancedVar(value) {
2020
var match = balanced('(', ')', value)
2121
if (match) {
2222
// Check if it was prepended with var
23-
if (/(?:^|\s)var$/.test(match.pre)) {
23+
if (/(?:^|[^\w-])var$/.test(match.pre)) {
2424
// Remove the var from the end of pre
2525
return {
2626
pre: match.pre.slice(0, -3),

0 commit comments

Comments
 (0)