simple fix on SharedArrayBuffer is not defined (#7)
This commit is contained in:
@@ -10,7 +10,13 @@ export const isWasmSupported = () =>
|
|||||||
Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00)
|
Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const isMultiThreadSupported = () => SharedArrayBuffer !== undefined;
|
export const isMultiThreadSupported = () => {
|
||||||
|
try {
|
||||||
|
return SharedArrayBuffer !== undefined;
|
||||||
|
} catch(e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
export const isEngineSupported = (name: EngineName): boolean => {
|
export const isEngineSupported = (name: EngineName): boolean => {
|
||||||
switch (name) {
|
switch (name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user