Skip to content

Commit e9e8837

Browse files
Ensure that the entire contents are simply 'use strict'.
1 parent dbaa6e1 commit e9e8837

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7651,7 +7651,7 @@ const _super = (function (geti, seti) {
76517651
}
76527652

76537653
function isUseStrictPrologue(node: ExpressionStatement): boolean {
7654-
return !!(node.expression as StringLiteral).text.match(/use strict/);
7654+
return (node.expression as StringLiteral).text === "use strict";
76557655
}
76567656

76577657
function ensureUseStrictPrologue(startWithNewLine: boolean, writeUseStrict: boolean) {

0 commit comments

Comments
 (0)