File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1622,7 +1622,7 @@ MaybeLocal<Object> ContextifyFunction::CompileFunctionAndCacheResult(
1622
1622
// While top-level `await` is not permitted in CommonJS, it returns the same
1623
1623
// error message as when `await` is used in a sync function, so we don't use it
1624
1624
// as a disambiguation.
1625
- static std::vector<std::string_view> esm_syntax_error_messages = {
1625
+ static const std::vector<std::string_view> esm_syntax_error_messages = {
1626
1626
" Cannot use import statement outside a module" , // `import` statements
1627
1627
" Unexpected token 'export'" , // `export` statements
1628
1628
" Cannot use 'import.meta' outside a module" }; // `import.meta` references
@@ -1637,7 +1637,7 @@ static std::vector<std::string_view> esm_syntax_error_messages = {
1637
1637
// - Top-level `await`: if the user writes `await` at the top level of a
1638
1638
// CommonJS module, it will throw a syntax error; but the same code is valid
1639
1639
// in ESM.
1640
- static std::vector<std::string_view> throws_only_in_cjs_error_messages = {
1640
+ static const std::vector<std::string_view> throws_only_in_cjs_error_messages = {
1641
1641
" Identifier 'module' has already been declared" ,
1642
1642
" Identifier 'exports' has already been declared" ,
1643
1643
" Identifier 'require' has already been declared" ,
You can’t perform that action at this time.
0 commit comments