From 08bd2ca0e0c530fe9a22466569fe0e8160e74752 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh <46249765+quantum9Innovation@users.noreply.github.com> Date: Fri, 16 Feb 2024 19:43:38 +0000 Subject: [PATCH] Remove annoying dev loader errors Prehistoric browser users will no longer get a notification to upgrade their browsers; they will stay in the stone age, unable to access Web3 content --- src/app/db/loaders.ts | 58 +++++++------------------------------------ 1 file changed, 9 insertions(+), 49 deletions(-) diff --git a/src/app/db/loaders.ts b/src/app/db/loaders.ts index 86f0be7..a81b2b3 100644 --- a/src/app/db/loaders.ts +++ b/src/app/db/loaders.ts @@ -31,11 +31,7 @@ export const loadDocument = (id: string): Promise => { worker.postMessage(id) } else { - reject( - new Error( - 'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.' - ) - ) + return } }) } @@ -62,11 +58,7 @@ export const loadAllDocuments = (): Promise<{ [key: string]: Document }> => { worker.postMessage('LOAD') } else { - reject( - new Error( - 'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.' - ) - ) + return } }) } @@ -123,12 +115,7 @@ export const loadAuthors = ( worker.postMessage(authorIds) } else { - reject( - new Error( - `Web Workers are not supported in this environment. Please avoid using a prehistoric browser. - If nothing else seems wrong, this error message is probably showing up due to ghosts in your browser.` - ) - ) + return } }) } @@ -159,12 +146,7 @@ export const loadAffiliation = (id: string): Promise => { worker.postMessage('LOAD') } else { - reject( - new Error( - `Web Workers are not supported in this environment. Please avoid using a prehistoric browser. - If nothing else seems wrong, this error message is probably showing up due to ghosts in your browser.` - ) - ) + return } }) } @@ -191,11 +173,7 @@ export const loadAllAffiliations = (): Promise<{ worker.postMessage('LOAD') } else { - reject( - new Error( - 'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.' - ) - ) + return } }) } @@ -226,12 +204,7 @@ export const loadTopic = (id: string): Promise => { worker.postMessage('LOAD') } else { - reject( - new Error( - `Web Workers are not supported in this environment. Please avoid using a prehistoric browser. - If nothing else seems wrong, this error message is probably showing up due to ghosts in your browser.` - ) - ) + return } }) } @@ -258,11 +231,7 @@ export const loadAllTopics = (): Promise<{ worker.postMessage('LOAD') } else { - reject( - new Error( - 'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.' - ) - ) + return } }) } @@ -293,12 +262,7 @@ export const loadNationality = (id: string): Promise => { worker.postMessage('LOAD') } else { - reject( - new Error( - `Web Workers are not supported in this environment. Please avoid using a prehistoric browser. - If nothing else seems wrong, this error message is probably showing up due to ghosts in your browser.` - ) - ) + return } }) } @@ -325,11 +289,7 @@ export const loadAllNationalities = (): Promise<{ worker.postMessage('LOAD') } else { - reject( - new Error( - 'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.' - ) - ) + return } }) }