File: replace-__proto__.patch

package info (click to toggle)
node-nodeunit 0.11.3%2Bds-5~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,076 kB
  • sloc: javascript: 3,323; makefile: 141
file content (16 lines) | stat: -rw-r--r-- 472 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Description: replace deprecated __proto__ call
Author: Yadd <yadd@debian.org>
Forwarded: no
Last-Update: 2022-09-14

--- a/lib/assert.js
+++ b/lib/assert.js
@@ -96,7 +96,7 @@
 
 // assert.AssertionError instanceof Error
 
-assert.AssertionError.__proto__ = Error.prototype;
+Object.setPrototypeOf(assert.AssertionError, Error.prototype);
 
 // At present only the three keys mentioned above are used and
 // understood by the spec. Implementations or sub modules can pass