🐛 fix uniq function bug with edge (#1065)

Co-authored-by: gongshun <gongshun@gridsum.com>
This commit is contained in:
gongshun 2020-11-11 12:31:49 +08:00 committed by GitHub
parent 387ceb3594
commit 69b6d54e0b

View File

@ -14,7 +14,7 @@ import { getTargetValue, setCurrentRunningSandboxProxy } from './common';
function uniq(array: PropertyKey[]) {
return array.filter(function filter(this: PropertyKey[], element) {
return element in this ? false : ((this as any)[element] = true);
}, {});
}, Object.create(null));
}
// zone.js will overwrite Object.defineProperty