Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxingbaoyu committed Jan 24, 2024
1 parent ec83450 commit 6a7f7a9
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export default (

const polyfilled = new WeakSet();
function maybeMark(path: NodePath, oldNode: t.Node) {
if (path.node !== oldNode) {
// Avoid Instance Properties
if (path.node !== oldNode && !path.isCallExpression()) {
polyfilled.add(path.node);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,54 @@
String.prototype.padStart || err;
!String.prototype.padStart || ok;
Reflect.construct || err;
!Reflect.construct || ok;


String.prototype.padStart ? ok : err;
!String.prototype.padStart ? err : ok;
Reflect.construct ? ok : err;
!Reflect.construct ? err : ok;

if (String.prototype.padStart) {
if (Reflect.construct) {
ok;
} else {
err;
}
if (!String.prototype.padStart) {
if (!Reflect.construct) {
err;
} else {
ok;
}


Symbol.dispose || err;
!Symbol.dispose || ok;


Symbol.dispose ? ok : err;
!Symbol.dispose ? err : ok;

if (Symbol.dispose) {
ok;
} else {
err;
}
if (!Symbol.dispose) {
err;
} else {
ok;
}


a.padStart || err;
!a.padStart || ok;


a.padStart ? ok : err;
!a.padStart ? err : ok;

if (a.padStart) {
ok;
} else {
err;
}
if (!a.padStart) {
err;
} else {
ok;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import _Reflect$construct from "core-js-pure/stable/reflect/construct.js";
import _Symbol from "core-js-pure/stable/symbol/index.js";
import _padStartInstanceProperty from "core-js-pure/stable/instance/pad-start.js";
_padStartInstanceProperty(String.prototype);
_Reflect$construct;
ok;
ok;
ok;
Expand All @@ -9,3 +11,31 @@ ok;
{
ok;
}
_Symbol.dispose || err;
!_Symbol.dispose || ok;
_Symbol.dispose ? ok : err;
!_Symbol.dispose ? err : ok;
if (_Symbol.dispose) {
ok;
} else {
err;
}
if (!_Symbol.dispose) {
err;
} else {
ok;
}
_padStartInstanceProperty(a) || err;
!_padStartInstanceProperty(a) || ok;
_padStartInstanceProperty(a) ? ok : err;
!_padStartInstanceProperty(a) ? err : ok;
if (_padStartInstanceProperty(a)) {
ok;
} else {
err;
}
if (!_padStartInstanceProperty(a)) {
err;
} else {
ok;
}

0 comments on commit 6a7f7a9

Please sign in to comment.