From 2e3ef452a5aed45b1b7e90cc532d32b87a790868 Mon Sep 17 00:00:00 2001 From: Gianluca Varisco Date: Fri, 1 Sep 2017 19:15:29 +0200 Subject: [PATCH] Replace Q.done with Promise.then This commit fixes #45 (Atom now uses ES6 Promises instead of Q. Call promise.then instead of promise.done) --- lib/rst-preview.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rst-preview.coffee b/lib/rst-preview.coffee index db19b5a..471ad95 100644 --- a/lib/rst-preview.coffee +++ b/lib/rst-preview.coffee @@ -93,7 +93,7 @@ module.exports = addPreviewForEditor: (editor) -> uri = @uriForEditor(editor) previousActivePane = atom.workspace.getActivePane() - atom.workspace.open(uri, split: 'right', searchAllPanes: true).done (rstPreviewView) -> + atom.workspace.open(uri, split: 'right', searchAllPanes: true).then (rstPreviewView) -> if isRstPreviewView(rstPreviewView) previousActivePane.activate()