@lvce-editor/output-view 2.24.2 → 2.24.4

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.
@@ -1530,7 +1530,7 @@ const parseStructuredLogLine = line => {
1530
1530
  }];
1531
1531
  };
1532
1532
 
1533
- const RE_SOURCE_LINK = /^lvce(?:-oss)?:\/\//;
1533
+ const RE_SOURCE_LINK = /^(?:lvce(?:-oss)?:\/\/|file:\/\/)/;
1534
1534
  const RE_SOURCE_LOCATION = /:(\d+)(?::(\d+))?$/;
1535
1535
  const getLinkPart = match => {
1536
1536
  if (RE_SOURCE_LINK.test(match)) {
@@ -2324,6 +2324,9 @@ const setupChangeListener = async (oldWatchId, newWatchId, uri) => {
2324
2324
  unregisterWatchCallback(oldWatchId);
2325
2325
  await unwatchFile(oldWatchId);
2326
2326
  }
2327
+ if (!uri) {
2328
+ return;
2329
+ }
2327
2330
  if (isExtensionOutputUri(uri)) {
2328
2331
  return;
2329
2332
  }
@@ -2628,7 +2631,22 @@ const loadContent = async (state, savedState) => {
2628
2631
  const options = await loadOptions(platform);
2629
2632
  const option = getMatchingOpen(options, selectedId);
2630
2633
  if (!option) {
2631
- throw new Error('option not found');
2634
+ await setupChangeListener(watchId, 0, '');
2635
+ const buttons = loadButtons();
2636
+ return {
2637
+ ...state,
2638
+ buttons,
2639
+ collapsedUris,
2640
+ error: '',
2641
+ errorCode: 0,
2642
+ filteredItems: [],
2643
+ filterValue,
2644
+ listItems: [],
2645
+ options,
2646
+ scrollLockEnabled,
2647
+ selectedOption: '',
2648
+ watchId: 0
2649
+ };
2632
2650
  }
2633
2651
  const {
2634
2652
  uri
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/output-view",
3
- "version": "2.24.2",
3
+ "version": "2.24.4",
4
4
  "description": "Output View Worker",
5
5
  "repository": {
6
6
  "type": "git",