diff --git a/packages/babylon/src/parseutil.js b/packages/babylon/src/parseutil.js index 1834724bdc..47af1b9b06 100755 --- a/packages/babylon/src/parseutil.js +++ b/packages/babylon/src/parseutil.js @@ -10,7 +10,7 @@ const pp = Parser.prototype; pp.isUseStrict = function (stmt) { return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && - stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; + stmt.expression.type === "Literal" && stmt.expression.raw.slice(1, -1) === "use strict"; }; // Predicate that tests whether the next token is of the given