We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33e669b commit b111de4Copy full SHA for b111de4
src/core/util/next-tick.js
@@ -81,9 +81,11 @@ if (typeof Promise !== 'undefined' && isNative(Promise)) {
81
export function withMacroTask (fn: Function): Function {
82
return fn._withTask || (fn._withTask = function () {
83
useMacroTask = true
84
- const res = fn.apply(null, arguments)
85
- useMacroTask = false
86
- return res
+ try {
+ return fn.apply(null, arguments)
+ } finally {
87
+ useMacroTask = false
88
+ }
89
})
90
}
91
0 commit comments