Skip to content

Commit 0c62fa2

Browse files
remove Firefox warning about prototype overwrite
1 parent 806547d commit 0c62fa2

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/currency.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var Currency = extend(function() {
2222
this._update();
2323
}, UInt160);
2424

25-
Currency.prototype = extend({}, UInt160.prototype);
25+
Currency.prototype = Object.create(extend({}, UInt160.prototype));
2626
Currency.prototype.constructor = Currency;
2727

2828
Currency.HEX_CURRENCY_BAD = '0000000000000000000000005852500000000000';

src/seed.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Seed = extend(function() {
1919
}, UInt);
2020

2121
Seed.width = 16;
22-
Seed.prototype = extend({}, UInt.prototype);
22+
Seed.prototype = Object.create(extend({}, UInt.prototype));
2323
Seed.prototype.constructor = Seed;
2424

2525
// value = NaN on error.

src/uint128.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var UInt128 = extend(function() {
1313
}, UInt);
1414

1515
UInt128.width = 16;
16-
UInt128.prototype = extend({}, UInt.prototype);
16+
UInt128.prototype = Object.create(extend({}, UInt.prototype));
1717
UInt128.prototype.constructor = UInt128;
1818

1919
var HEX_ZERO = UInt128.HEX_ZERO = '00000000000000000000000000000000';

src/uint160.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var UInt160 = extend(function() {
1717
}, UInt);
1818

1919
UInt160.width = 20;
20-
UInt160.prototype = extend({}, UInt.prototype);
20+
UInt160.prototype = Object.create(extend({}, UInt.prototype));
2121
UInt160.prototype.constructor = UInt160;
2222

2323
var HEX_ZERO = UInt160.HEX_ZERO = '0000000000000000000000000000000000000000';

src/uint256.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ var UInt256 = extend(function() {
1313
}, UInt);
1414

1515
UInt256.width = 32;
16-
UInt256.prototype = extend({}, UInt.prototype);
16+
UInt256.prototype = Object.create(extend({}, UInt.prototype));
1717
UInt256.prototype.constructor = UInt256;
1818

1919
var HEX_ZERO = UInt256.HEX_ZERO = '00000000000000000000000000000000' +

0 commit comments

Comments
 (0)