From 6082275571ca5d10a948a6324864a5ddac61425b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E7=AD=9D?= Date: Wed, 21 Dec 2022 17:13:45 +0800 Subject: [PATCH] fix: __importDefault add mod default property verfiy, for this issue: https://github.com/microsoft/tslib/issues/190 --- tslib.es6.js | 2 +- tslib.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tslib.es6.js b/tslib.es6.js index 063e8c8..87a3875 100644 --- a/tslib.es6.js +++ b/tslib.es6.js @@ -226,7 +226,7 @@ export function __importStar(mod) { } export function __importDefault(mod) { - return (mod && mod.__esModule) ? mod : { default: mod }; + return (mod && mod.__esModule && mod.default) ? mod : { default: mod }; } export function __classPrivateFieldGet(receiver, state, kind, f) { diff --git a/tslib.js b/tslib.js index fd9a852..b3f9d6e 100644 --- a/tslib.js +++ b/tslib.js @@ -268,7 +268,7 @@ var __createBinding; }; __importDefault = function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; + return (mod && mod.__esModule && mod.default) ? mod : { "default": mod }; }; __classPrivateFieldGet = function (receiver, state, kind, f) {