File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1571,7 +1571,7 @@ function abstractMatrix(superCtor) {
1571
1571
1572
1572
var staticOperator = `
1573
1573
(function %name%(matrix, value) {
1574
- var newMatrix = new this(matrix);
1574
+ var newMatrix = new this[Symbol.species] (matrix);
1575
1575
return newMatrix.%name%(value);
1576
1576
})
1577
1577
` ;
@@ -1589,7 +1589,7 @@ function abstractMatrix(superCtor) {
1589
1589
1590
1590
var staticMethod = `
1591
1591
(function %name%(matrix) {
1592
- var newMatrix = new this(matrix);
1592
+ var newMatrix = new this[Symbol.species] (matrix);
1593
1593
return newMatrix.%name%();
1594
1594
})
1595
1595
` ;
@@ -1607,7 +1607,7 @@ function abstractMatrix(superCtor) {
1607
1607
1608
1608
var staticMethodWithArgs = `
1609
1609
(function %name%(matrix, %args%) {
1610
- var newMatrix = new this(matrix);
1610
+ var newMatrix = new this[Symbol.species] (matrix);
1611
1611
return newMatrix.%name%(%args%);
1612
1612
})
1613
1613
` ;
You can’t perform that action at this time.
0 commit comments