File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ function encodePotentialMethod( target, prop) {
112112 var item ;
113113 for ( i in REFERENCES ) {
114114 item = REFERENCES [ i ] ;
115- if ( item . type === 'potential-method' && item . target === target , item . prop === prop )
115+ if ( item . type === 'potential-method' && item . target === target && item . prop === prop )
116116 return { type : 'funref' , value : i } ;
117117 }
118118 i = '' + nextRefId ++ ;
@@ -176,9 +176,9 @@ function decodePotentialMethod( encoded) {
176176 args = decode ( input [ 3 ] ) ;
177177 if ( target [ 'potential-method' ] ) {
178178 if ( thisArg === undefined )
179- throw new Error ( 'potentially a method, can only be used as such ' ) ;
179+ throw new Error ( 'potentially a method, use with a "this" ' ) ;
180180 if ( thisArg !== target . target )
181- throw new Error ( 'potentially a method, can only be used as such ' ) ;
181+ throw new Error ( 'potentially a method, "this" has changed ' ) ;
182182 switch ( args . length ) {
183183 case 0 : output = [ 'value' , encode ( target . target [ target . prop ] ( ) ) ] ; break ;
184184 case 1 : output = [ 'value' , encode ( target . target [ target . prop ] ( args [ 0 ] ) ) ] ; break ;
You can’t perform that action at this time.
0 commit comments