Skip to content

Commit e4170d3

Browse files
authored
Fix not to get loc when passing true to ParserOptions.location (#242)
1 parent e03bc22 commit e4170d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/message-compiler/src/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function fromEscapeSequence(
117117
}
118118

119119
export function createParser(options: ParserOptions = {}): Parser {
120-
const location = !options.location
120+
const location = options.location !== false
121121

122122
const { onError } = options
123123
function emitError(

packages/message-compiler/src/tokenizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function createTokenizer(
7676
source: string,
7777
options: TokenizeOptions = {}
7878
): Tokenizer {
79-
const location = !options.location
79+
const location = options.location !== false
8080

8181
const _scnr = createScanner(source)
8282

0 commit comments

Comments
 (0)