Suppress Safari promise rejections.

Currently Webkit implements createImageBitmap() but returns a promise
rejection.

Note that once Webkit implements createImageBitmap() correctly these
changes should be removed.
This commit is contained in:
muji
2018-05-24 10:11:03 +08:00
parent 09e42af730
commit 87fee8d024
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@ const userAgent = (isNode) ? 'node' : navigator.userAgent;
const platform = (isNode) ? 'node' : navigator.platform;
export const isFirefox = !!~userAgent.indexOf('Firefox');
export const isSafari = !!~userAgent.indexOf('Safari');
export const isMSIE = !!~userAgent.indexOf('MSIE') || !!~userAgent.indexOf('Trident');
// Find the users platform. We use this to interpret the meta key