Skip to content

Commit

Permalink
fix: Patch external-editor constructor override error
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Jun 20, 2021
1 parent 1218ddd commit 8435859
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions patches/external-editor+3.1.0.patch
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,51 @@ index 85a164e..217f192 100644
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
diff --git a/node_modules/external-editor/main/errors/ReadFileError.js b/node_modules/external-editor/main/errors/ReadFileError.js
index 69e0513..e53e584 100644
--- a/node_modules/external-editor/main/errors/ReadFileError.js
+++ b/node_modules/external-editor/main/errors/ReadFileError.js
@@ -14,7 +14,18 @@ var __extends = (this && this.__extends) || (function () {
};
return function (d, b) {
extendStatics(d, b);
- function __() { this.constructor = d; }
+ function __() {
+ if (Object.defineProperty) {
+ Object.defineProperty(this, 'constructor', {
+ value: d,
+ writable: true,
+ configurable: true,
+ enumerable: true,
+ });
+ } else {
+ this.constructor = d;
+ }
+ }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
diff --git a/node_modules/external-editor/main/errors/RemoveFileError.js b/node_modules/external-editor/main/errors/RemoveFileError.js
index 23d266f..86e228e 100644
--- a/node_modules/external-editor/main/errors/RemoveFileError.js
+++ b/node_modules/external-editor/main/errors/RemoveFileError.js
@@ -14,7 +14,18 @@ var __extends = (this && this.__extends) || (function () {
};
return function (d, b) {
extendStatics(d, b);
- function __() { this.constructor = d; }
+ function __() {
+ if (Object.defineProperty) {
+ Object.defineProperty(this, 'constructor', {
+ value: d,
+ writable: true,
+ configurable: true,
+ enumerable: true,
+ });
+ } else {
+ this.constructor = d;
+ }
+ }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();

0 comments on commit 8435859

Please sign in to comment.