Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohannes Ewald <johannes.ewald@peerigon.com>2018-04-24 14:29:51 +0300
committerJohannes Ewald <johannes.ewald@peerigon.com>2018-04-24 14:29:51 +0300
commit460dfd1eb65cff2935fae460a6c71b0171b226c7 (patch)
tree6d724a4b39df388ee7cde407ca6b9b05db019c87 /lib
parent6ffd4d1405c9f812f7bcd3b915f4da262afec754 (diff)
Fix const regex
Fixes an issue where const wasn't properly detected when using destructering.
Diffstat (limited to 'lib')
-rw-r--r--lib/moduleEnv.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/moduleEnv.js b/lib/moduleEnv.js
index 599e332..3b05bca 100644
--- a/lib/moduleEnv.js
+++ b/lib/moduleEnv.js
@@ -42,7 +42,7 @@ var moduleWrapper0 = Module.wrapper[0],
// However, since most projects have a seperate linting step which catches these const re-assignment
// errors anyway, it's probably still a reasonable trade-off.
// Test the regular expresssion at https://regex101.com/r/dvnZPv/2 and also check out testLib/constModule.js.
- matchConst = /(^|\s|\}|;)const(\/\*|\s)/gm,
+ matchConst = /(^|\s|\}|;)const(\/\*|\s|{)/gm,
nodeRequire,
currentModule;