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
This commit is contained in:
parent
75ca17c5b3
commit
08bd2ca0e0
1 changed files with 9 additions and 49 deletions
|
@ -31,11 +31,7 @@ export const loadDocument = (id: string): Promise<Document> => {
|
||||||
|
|
||||||
worker.postMessage(id)
|
worker.postMessage(id)
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
new Error(
|
|
||||||
'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -62,11 +58,7 @@ export const loadAllDocuments = (): Promise<{ [key: string]: Document }> => {
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
new Error(
|
|
||||||
'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -123,12 +115,7 @@ export const loadAuthors = (
|
||||||
|
|
||||||
worker.postMessage(authorIds)
|
worker.postMessage(authorIds)
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
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.`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -159,12 +146,7 @@ export const loadAffiliation = (id: string): Promise<Affiliation> => {
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
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.`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -191,11 +173,7 @@ export const loadAllAffiliations = (): Promise<{
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
new Error(
|
|
||||||
'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -226,12 +204,7 @@ export const loadTopic = (id: string): Promise<Topic> => {
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
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.`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -258,11 +231,7 @@ export const loadAllTopics = (): Promise<{
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
new Error(
|
|
||||||
'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -293,12 +262,7 @@ export const loadNationality = (id: string): Promise<Nationality> => {
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
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.`
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -325,11 +289,7 @@ export const loadAllNationalities = (): Promise<{
|
||||||
|
|
||||||
worker.postMessage('LOAD')
|
worker.postMessage('LOAD')
|
||||||
} else {
|
} else {
|
||||||
reject(
|
return
|
||||||
new Error(
|
|
||||||
'Web Workers are not supported in this environment. Please avoid using a prehistoric browser.'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue