fix(lib-util): update js-sha256 import (#4699)
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import sha256 from 'js-sha256';
|
||||
import { sha256 } from 'js-sha256';
|
||||
|
||||
export default (blob: Blob): Promise<string> =>
|
||||
new Promise((resolve, reject) => {
|
||||
const fr = new FileReader();
|
||||
fr.onload = ({ target }) => resolve(sha256(target?.result));
|
||||
fr.onload = ({ target }) => resolve(sha256(target?.result || ''));
|
||||
fr.onerror = err => {
|
||||
fr.abort();
|
||||
reject(err);
|
||||
|
Reference in New Issue
Block a user