File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
1
node_modules /
2
+ __testfile
Original file line number Diff line number Diff line change @@ -49,8 +49,13 @@ Namespace.prototype.run = function (fn) {
49
49
return context ;
50
50
}
51
51
catch ( exception ) {
52
- if ( exception ) {
53
- exception [ ERROR_SYMBOL ] = context ;
52
+ if ( exception && ! exception [ ERROR_SYMBOL ] ) {
53
+ Object . defineProperty ( exception , ERROR_SYMBOL , {
54
+ configurable : true ,
55
+ enumerable : false ,
56
+ writable : false ,
57
+ value : context
58
+ } ) ;
54
59
}
55
60
throw exception ;
56
61
}
@@ -76,8 +81,13 @@ Namespace.prototype.bind = function (fn, context) {
76
81
return fn . apply ( this , arguments ) ;
77
82
}
78
83
catch ( exception ) {
79
- if ( exception ) {
80
- exception [ ERROR_SYMBOL ] = context ;
84
+ if ( exception && ! exception [ ERROR_SYMBOL ] ) {
85
+ Object . defineProperty ( exception , ERROR_SYMBOL , {
86
+ configurable : true ,
87
+ enumerable : false ,
88
+ writable : false ,
89
+ value : context
90
+ } ) ;
81
91
}
82
92
throw exception ;
83
93
}
You can’t perform that action at this time.
0 commit comments