Skip to content

Commit 028dbd7

Browse files
Update node_contextify.cc
Co-authored-by: Anna Henningsen <[email protected]>
1 parent 71dd334 commit 028dbd7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/node_contextify.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ MaybeLocal<Object> ContextifyFunction::CompileFunctionAndCacheResult(
16221622
// While top-level `await` is not permitted in CommonJS, it returns the same
16231623
// error message as when `await` is used in a sync function, so we don't use it
16241624
// as a disambiguation.
1625-
static const std::vector<std::string_view> esm_syntax_error_messages = {
1625+
static const auto esm_syntax_error_messages = std::to_array<std::string_view>({
16261626
"Cannot use import statement outside a module", // `import` statements
16271627
"Unexpected token 'export'", // `export` statements
16281628
"Cannot use 'import.meta' outside a module"}; // `import.meta` references

0 commit comments

Comments
 (0)