From e60e23b462728d7626a16a0ba47f8bc5b3bd2661 Mon Sep 17 00:00:00 2001 From: John Honaker Date: Mon, 29 May 2017 10:47:35 -0400 Subject: [PATCH] Fix the deprecation warning in #47. This simple fix of removing the call for the object in the addViewProvider function fixes the deprecation warning listed in issue #47. --- lib/main.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/main.js b/lib/main.js index 9b0c736..247687e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -24,9 +24,8 @@ export default { fixPath(); this.openerDisposable = atom.workspace.addOpener(openURI); this.commands = atom.commands.add('.notebook-cell atom-text-editor', 'jupyter-notebook-atom:run', this.run); - atom.views.addViewProvider({ - modelConstructor: NotebookEditor, - createView: model => { + atom.views.addViewProvider(NotebookEditor, + model => { let el = document.createElement('div'); el.classList.add('notebook-wrapper'); let viewComponent = ReactDOM.render(