@lvce-editor/editor-worker 19.79.0 → 19.79.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/diff-sdk.js +2 -2
- package/dist/editorWorkerMain.js +2 -2
- package/package.json +1 -1
package/dist/diff-sdk.js
CHANGED
|
@@ -15954,7 +15954,7 @@ const applyWorkspaceEdit = async (editor, changes) => {
|
|
|
15954
15954
|
// Registered through wrapCommand, so validation and the edit share the
|
|
15955
15955
|
// document's command queue with typing and edits from other callers.
|
|
15956
15956
|
const compareAndSetText = async (editor, uri, expectedText, text, applicationId) => {
|
|
15957
|
-
if (
|
|
15957
|
+
if (applicationId === '' || editor.applicationId !== applicationId || editor.uri !== uri) {
|
|
15958
15958
|
throw new Error('The editor document no longer belongs to this application and URI');
|
|
15959
15959
|
}
|
|
15960
15960
|
if (typeof expectedText !== 'string' || typeof text !== 'string') {
|
|
@@ -16218,7 +16218,7 @@ const getLanguageByExtension = (languages, extensionLower) => {
|
|
|
16218
16218
|
};
|
|
16219
16219
|
const getLanguageByFileName = (languages, fileNameLower) => {
|
|
16220
16220
|
for (const language of languages) {
|
|
16221
|
-
if (language && language.fileNames &&
|
|
16221
|
+
if (Array.isArray(language?.fileNames) && language.fileNames.some(fileName => typeof fileName === 'string' && fileName.toLowerCase() === fileNameLower)) {
|
|
16222
16222
|
return language.id;
|
|
16223
16223
|
}
|
|
16224
16224
|
}
|
package/dist/editorWorkerMain.js
CHANGED
|
@@ -16405,7 +16405,7 @@ const applyWorkspaceEdit = async (editor, changes) => {
|
|
|
16405
16405
|
// Registered through wrapCommand, so validation and the edit share the
|
|
16406
16406
|
// document's command queue with typing and edits from other callers.
|
|
16407
16407
|
const compareAndSetText = async (editor, uri, expectedText, text, applicationId) => {
|
|
16408
|
-
if (
|
|
16408
|
+
if (applicationId === '' || editor.applicationId !== applicationId || editor.uri !== uri) {
|
|
16409
16409
|
throw new Error('The editor document no longer belongs to this application and URI');
|
|
16410
16410
|
}
|
|
16411
16411
|
if (typeof expectedText !== 'string' || typeof text !== 'string') {
|
|
@@ -16669,7 +16669,7 @@ const getLanguageByExtension = (languages, extensionLower) => {
|
|
|
16669
16669
|
};
|
|
16670
16670
|
const getLanguageByFileName = (languages, fileNameLower) => {
|
|
16671
16671
|
for (const language of languages) {
|
|
16672
|
-
if (language && language.fileNames &&
|
|
16672
|
+
if (Array.isArray(language?.fileNames) && language.fileNames.some(fileName => typeof fileName === 'string' && fileName.toLowerCase() === fileNameLower)) {
|
|
16673
16673
|
return language.id;
|
|
16674
16674
|
}
|
|
16675
16675
|
}
|