Skip to content

Commit 0468429

Browse files
committed
resolve merge (we fixed at same time. better to avoid eslint comments if we can)
2 parents 3f8feb9 + 1025f5b commit 0468429

File tree

1 file changed

+3
-0
lines changed
  • packages/svelte/src/compiler/phases/1-parse/read

1 file changed

+3
-0
lines changed

packages/svelte/src/compiler/phases/1-parse/read/context.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export default function read_context(parser) {
9898
* @returns {any}
9999
*/
100100
function read_type_annotation(parser) {
101+
const index = parser.index;
101102
parser.allow_whitespace();
102103

103104
if (parser.eat(':')) {
@@ -109,5 +110,7 @@ function read_type_annotation(parser) {
109110

110111
parser.index = /** @type {number} */ (expression.end);
111112
return /** @type {any} */ (expression).typeAnnotation;
113+
} else {
114+
parser.index = index;
112115
}
113116
}

0 commit comments

Comments
 (0)