Skip to content

Commit 0ab91eb

Browse files
authored
fix(subscribe): allow interop with Monio and other libraries that patch function bind
* fix(subscribe): allows functions where bind has been patched to be weird Apparently, code exists in the wild that will patch function bind to do something other than return a function that will execute the function instance, so we cannot rely on bind. Resolves #6783 * refactor: Alternative bind approach * chore: update side-effects golden files. * chore: Add comment about why bind is captured * chore: update side-effect files again
1 parent e43063a commit 0ab91eb

14 files changed

Lines changed: 64 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
const _bind = Function.prototype.bind;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
import "tslib";
2+
3+
const _bind = Function.prototype.bind;

integration/side-effects/snapshots/esm/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "tslib";
22

3+
const _bind = Function.prototype.bind;
4+
35
var NotificationKind;
46

57
(function(NotificationKind) {

integration/side-effects/snapshots/esm/operators.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "tslib";
22

3+
const _bind = Function.prototype.bind;
4+
35
var NotificationKind;
46

57
(function(NotificationKind) {

integration/side-effects/snapshots/esm/testing.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "tslib";
22

3+
const _bind = Function.prototype.bind;
4+
35
var NotificationKind;
46

57
(function(NotificationKind) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1+
const _bind = Function.prototype.bind;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
import "tslib";
2+
3+
var _bind = Function.prototype.bind;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
import "tslib";
2+
3+
var _bind = Function.prototype.bind;

integration/side-effects/snapshots/esm5/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "tslib";
22

3+
var _bind = Function.prototype.bind;
4+
35
var NotificationKind;
46

57
(function(NotificationKind) {

integration/side-effects/snapshots/esm5/operators.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import "tslib";
22

3+
var _bind = Function.prototype.bind;
4+
35
var NotificationKind;
46

57
(function(NotificationKind) {

0 commit comments

Comments
 (0)