mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
23 lines
653 B
TypeScript
23 lines
653 B
TypeScript
import type { Plugin } from '@nuxt/types';
|
|
|
|
const plugin: Plugin = () => {
|
|
if (!Object.prototype.hasOwnProperty.call(Object, 'hasOwn')) {
|
|
Object.defineProperty(Object, 'hasOwn', {
|
|
value: (object: object, property: PropertyKey) => {
|
|
return Object.prototype.hasOwnProperty.call(object, property);
|
|
},
|
|
});
|
|
}
|
|
if (!Object.prototype.hasOwnProperty.call(window, 'BroadcastChannel')) {
|
|
Object.defineProperty(window, 'BroadcastChannel', {
|
|
value: class {
|
|
postMessage() {}
|
|
|
|
close() {}
|
|
},
|
|
});
|
|
}
|
|
};
|
|
|
|
export default plugin;
|