Support esnext in storybook

This commit is contained in:
Fedor Indutny 2023-01-12 12:58:53 -08:00 committed by GitHub
parent 468ca256e6
commit 19279cfebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1088 additions and 434 deletions

View file

@ -1,8 +1,6 @@
// Copyright 2018 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import is from '@sindresorhus/is';
import type { MIMEType } from '../types/MIME';
export const arrayBufferToObjectURL = ({
@ -12,7 +10,7 @@ export const arrayBufferToObjectURL = ({
data: ArrayBuffer;
type: MIMEType;
}): string => {
if (!is.arrayBuffer(data)) {
if (!(data instanceof ArrayBuffer)) {
throw new TypeError('`data` must be an ArrayBuffer');
}