mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
🎨
This commit is contained in:
@@ -690,11 +690,10 @@ class Config
|
||||
# rejected {Promise} will be returned instead.
|
||||
transactAsync: (callback) ->
|
||||
@beginTransaction()
|
||||
endTransaction = (resolveOrReject) => (args...) =>
|
||||
@endTransaction()
|
||||
resolveOrReject(args...)
|
||||
|
||||
try
|
||||
endTransaction = (fn) => (args...) =>
|
||||
@endTransaction()
|
||||
fn(args...)
|
||||
result = callback()
|
||||
new Promise (resolve, reject) =>
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user