From f33c419ed9bf6edba186b24ae4e456a5510b9299 Mon Sep 17 00:00:00 2001 From: GyDi Date: Sat, 19 Nov 2022 01:22:00 +0800 Subject: [PATCH] chore: rm polyfill --- src/main.tsx | 1 - src/utils/polyfill.ts | 21 --------------------- 2 files changed, 22 deletions(-) delete mode 100644 src/utils/polyfill.ts diff --git a/src/main.tsx b/src/main.tsx index 851001a..08241f4 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,7 +1,6 @@ /// /// import "./assets/styles/index.scss"; -import "@/utils/polyfill"; import React from "react"; import ReactDOM from "react-dom"; diff --git a/src/utils/polyfill.ts b/src/utils/polyfill.ts deleted file mode 100644 index 6849151..0000000 --- a/src/utils/polyfill.ts +++ /dev/null @@ -1,21 +0,0 @@ -// matchMedia polyfill for macOS 10.15 -if ( - window.MediaQueryList && - !window.MediaQueryList.prototype.addEventListener -) { - window.MediaQueryList.prototype.addEventListener = function ( - name: string, - callback: any - ) { - this.addListener(callback); - }; - - window.MediaQueryList.prototype.removeEventListener = function ( - name: string, - callback: any - ) { - this.removeListener(callback); - }; -} - -export {};