File: drop-__proto__-calls.patch

package info (click to toggle)
node-external-editor 3.1.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 232 kB
  • sloc: javascript: 65; makefile: 4
file content (53 lines) | stat: -rw-r--r-- 1,576 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Description: drop __proto__ calls
Author: Yadd <yadd@debian.org>
Forwarded: no
Last-Update: 2022-11-30

--- a/src/errors/CreateFileError.ts
+++ b/src/errors/CreateFileError.ts
@@ -13,8 +13,7 @@
         if ((Object as any).setPrototypeOf) {
             (Object as any).setPrototypeOf(this, proto);
         } else {
-            (this as any).__proto__ = new.target.prototype;
-
+            Object.setPrototypeOf(this as any, new.target.prototype);
         }
     }
 }
--- a/src/errors/LaunchEditorError.ts
+++ b/src/errors/LaunchEditorError.ts
@@ -13,8 +13,7 @@
         if ((Object as any).setPrototypeOf) {
             (Object as any).setPrototypeOf(this, proto);
         } else {
-            (this as any).__proto__ = new.target.prototype;
-
+            Object.setPrototypeOf(this as any, new.target.prototype);
         }
     }
 }
--- a/src/errors/ReadFileError.ts
+++ b/src/errors/ReadFileError.ts
@@ -13,8 +13,7 @@
         if ((Object as any).setPrototypeOf) {
             (Object as any).setPrototypeOf(this, proto);
         } else {
-            (this as any).__proto__ = new.target.prototype;
-
+            Object.setPrototypeOf(this as any, new.target.prototype);
         }
     }
 }
--- a/src/errors/RemoveFileError.ts
+++ b/src/errors/RemoveFileError.ts
@@ -13,8 +13,7 @@
         if ((Object as any).setPrototypeOf) {
             (Object as any).setPrototypeOf(this, proto);
         } else {
-            (this as any).__proto__ = new.target.prototype;
-
+            Object.setPrototypeOf(this as any, new.target.prototype);
         }
     }
 }