mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-23 13:13:49 +03:00
lint
This commit is contained in:
parent
9d8e19622f
commit
da2ba0ec49
@ -67,9 +67,9 @@ export const TAB_COLORS = [
|
||||
|
||||
export function serializeFunction <T extends () => Promise<any>> (fn: T): T {
|
||||
let queue = Promise.resolve()
|
||||
return (...args) => {
|
||||
return ((...args) => {
|
||||
const res = queue.then(() => fn(...args))
|
||||
queue = res.catch(() => null)
|
||||
return res
|
||||
}
|
||||
}) as T
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user