@volar/snapshot-document
Advanced tools
Comparing version 2.0.0-alpha.13 to 2.0.0-alpha.14
@@ -68,3 +68,3 @@ "use strict"; | ||
getLength: () => text.length, | ||
getChangeRange: (oldSnapshot) => { | ||
getChangeRange: oldSnapshot => { | ||
if (!changeRangeCache.has(oldSnapshot)) { | ||
@@ -115,4 +115,5 @@ const oldIndex = this.snapshots.findIndex(change => change.ref?.deref() === oldSnapshot); | ||
for (const contentChange of contentChanges) { | ||
if (!('range' in contentChange)) | ||
if (!('range' in contentChange)) { | ||
continue; | ||
} | ||
const start = this.offsetAt(contentChange.range.start); | ||
@@ -119,0 +120,0 @@ const length = contentChange.rangeLength ?? this.offsetAt(contentChange.range.end) - start; |
{ | ||
"name": "@volar/snapshot-document", | ||
"version": "2.0.0-alpha.13", | ||
"version": "2.0.0-alpha.14", | ||
"license": "MIT", | ||
@@ -18,3 +18,3 @@ "files": [ | ||
}, | ||
"gitHead": "b052e3d47235325ac614257be1cebd541d421134" | ||
"gitHead": "83eb6a4a4475a3680f14fb3808e48ec4dbe62cc1" | ||
} |
10238
213