File tree 1 file changed +5
-3
lines changed
packages/contracts/src.ts
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -728,8 +728,8 @@ export class BaseContract {
728
728
// are ambiguous
729
729
{
730
730
const name = fragment . name ;
731
- if ( ! uniqueNames [ name ] ) { uniqueNames [ name ] = [ ] ; }
732
- uniqueNames [ name ] . push ( signature ) ;
731
+ if ( ! uniqueNames [ `% ${ name } ` ] ) { uniqueNames [ `% ${ name } ` ] = [ ] ; }
732
+ uniqueNames [ `% ${ name } ` ] . push ( signature ) ;
733
733
}
734
734
735
735
if ( ( < Contract > this ) [ signature ] == null ) {
@@ -757,11 +757,13 @@ export class BaseContract {
757
757
} ) ;
758
758
759
759
Object . keys ( uniqueNames ) . forEach ( ( name ) => {
760
-
761
760
// Ambiguous names to not get attached as bare names
762
761
const signatures = uniqueNames [ name ] ;
763
762
if ( signatures . length > 1 ) { return ; }
764
763
764
+ // Strip off the leading "%" used for prototype protection
765
+ name = name . substring ( 1 ) ;
766
+
765
767
const signature = signatures [ 0 ] ;
766
768
767
769
// If overwriting a member property that is null, swallow the error
You can’t perform that action at this time.
0 commit comments