@lvce-editor/renderer-process 30.71.0 → 30.71.1

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.
@@ -785,9 +785,12 @@ const applyDataProperties = (restoredError, error) => {
785
785
  writable: true
786
786
  });
787
787
  }
788
- if (error.data.type) {
789
- // @ts-ignore
790
- restoredError.name = error.data.type;
788
+ const name = error.data.name || error.data.type;
789
+ if (name) {
790
+ Object.defineProperty(restoredError, 'name', {
791
+ configurable: true,
792
+ value: name
793
+ });
791
794
  }
792
795
  };
793
796
  const applyDirectProperties = (restoredError, error) => {
@@ -804,7 +807,7 @@ const applyDirectProperties = (restoredError, error) => {
804
807
  }
805
808
  };
806
809
  const restoreMessageError = (error, _currentStack) => {
807
- const restoredError = constructError(error.message, error.type || error.data?.type, error.name);
810
+ const restoredError = constructError(error.message, error.type || error.data?.type, error.name || error.data?.name);
808
811
  if (typeof error.code === 'string' || typeof error.code === 'number') {
809
812
  Object.defineProperty(restoredError, 'code', {
810
813
  configurable: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.71.0",
3
+ "version": "30.71.1",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"