Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Mar 23, 2021
1 parent f3328e4 commit d917543
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions playground/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const globalKeys = Object.getOwnPropertyNames(globalThis)
.filter(key => key[0].toLocaleLowerCase() === key[0])

export function evaluateSource (src) {
// eslint-disable-next-line no-new-func
const fn = Function(`
const sandbox = {
module: { exports: {} },
Expand Down Expand Up @@ -52,12 +53,13 @@ export function safeComputed (fn) {
})
}

export function asyncImport({ loader, loading, error }) {
export function asyncImport ({ loader, loading, error }) {
const m = reactive(loading || {})
loader().then((res) => Object.assign(m, res)).catch((err) => {
loader().then(res => Object.assign(m, res)).catch((err) => {
if (error) {
Object.assign(m, error(err))
}
// eslint-disable-next-line no-console
console.error(err)
})
return m
Expand Down

0 comments on commit d917543

Please sign in to comment.