mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Add Promise.prototype.done shim
Base on our research, this is the only non-standard Q method people are really calling. We didn’t check the really obscure stuff, but this should cover the vast majority of issues. Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
@@ -873,6 +873,11 @@ class Atom extends Model
|
||||
ipc.send('call-window-method', 'setAutoHideMenuBar', autoHide)
|
||||
ipc.send('call-window-method', 'setMenuBarVisibility', not autoHide)
|
||||
|
||||
# Preserve this deprecation until 2.0. Sorry. Should have removed Q sooner.
|
||||
Promise.prototype.done = (callback) ->
|
||||
deprecate("Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done")
|
||||
@then(callback)
|
||||
|
||||
if includeDeprecatedAPIs
|
||||
# Deprecated: Callers should be converted to use atom.deserializers
|
||||
Atom::registerRepresentationClass = ->
|
||||
|
||||
Reference in New Issue
Block a user