File: drop-__proto__-calls.patch

package info (click to toggle)
node-readable-stream 3.6.0%2B~cs3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,996 kB
  • sloc: javascript: 20,337; makefile: 13; sh: 8
file content (15 lines) | stat: -rw-r--r-- 596 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: drop __proto__ calls
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2022-10-03

--- a/errors-browser.js
+++ b/errors-browser.js
@@ -1,6 +1,6 @@
 'use strict';
 
-function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
+function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; Object.setPrototypeOf(subClass, superClass); }
 
 var codes = {};