mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
web: fix crash on webkit (safari)
This commit is contained in:
@@ -52,13 +52,17 @@ try {
|
||||
}
|
||||
|
||||
function checkSupportsTransferable() {
|
||||
// Transferable stream was first enabled in chrome v73 behind a flag
|
||||
const { readable } = new TransformStream();
|
||||
const mc = new MessageChannel();
|
||||
mc.port1.postMessage(readable, [readable]);
|
||||
mc.port1.close();
|
||||
mc.port2.close();
|
||||
supportsTransferable = true;
|
||||
try {
|
||||
// Transferable stream was first enabled in chrome v73 behind a flag
|
||||
const { readable } = new TransformStream();
|
||||
const mc = new MessageChannel();
|
||||
mc.port1.postMessage(readable, [readable]);
|
||||
mc.port1.close();
|
||||
mc.port2.close();
|
||||
supportsTransferable = true;
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
checkSupportsTransferable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user