Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
19 lines
725 B
Plaintext
19 lines
725 B
Plaintext
"use strict";
|
|
|
|
function _is_native_reflect_construct() {
|
|
// Since Reflect.construct can't be properly polyfilled, some
|
|
// implementations (e.g. core-js@2) don't set the correct internal slots.
|
|
// Those polyfills don't allow us to subclass built-ins, so we need to
|
|
// use our fallback implementation.
|
|
try {
|
|
// If the internal slots aren't set, this throws an error similar to
|
|
// TypeError: this is not a Boolean object.
|
|
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
} catch (_) {}
|
|
return (exports._ = _is_native_reflect_construct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
exports._ = _is_native_reflect_construct;
|