File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ if(!Function.prototype.bind){
114114 var fnArgs = Array .prototype .slice .call (arguments , 1 );
115115
116116 return function (){
117- var allArgs = funcArgs .concat (Array .prototype .slice .call (arguments ))
117+ var allArgs = fnArgs .concat (Array .prototype .slice .call (arguments ))
118118 fn .apply (context, allArgs);
119119 };
120120 }
@@ -142,8 +142,8 @@ function softBind(fn, context) {
142142 var allArgs = fnArgs .concat (Array .prototype .slice .call (arguments ));
143143
144144 // override the context to incoming context if it is not undefined, null or window
145- var context = (! this || this === window ) ? obj : this ;
146- fn .apply (context , allArgs);
145+ var finalContext = (! this || this === window ) ? context : this ;
146+ fn .apply (finalContext , allArgs);
147147 };
148148}
149149```
@@ -641,4 +641,4 @@ This is a well known JavaScript pattern called as __Publish/Subscribe Pattern__
641641
642642<br />
643643
644- [[↑] Back to top](#home)
644+ [[↑] Back to top](#home)
You can’t perform that action at this time.
0 commit comments