JunoLab / atom-ink

IDE toolkit for Atom
MIT License
228 stars 40 forks source link

Fix `subs` is not defined #289

Closed sertonix closed 1 year ago

sertonix commented 1 year ago

Since Atom was killed the community came together and made a fork called Pulsar. It has updated a lot of parts in the editor.

While most packages still work some old javascript styles are not valid anymore. This fixes a syntax error.

It would be nice if a new version with this fix could be published to the new packend. If there are any problems you can create an issue on the github repo.

goyalyashpal commented 1 year ago

@pfitzseb @MikeInnes can u please take a look at it :smiley:

goyalyashpal commented 1 year ago

a better change, again, as suggested by @savetheclocktower at https://github.com/pulsar-edit/pulsar/issues/482#issuecomment-1507302418 is to change these 2 instances of subs to this.subs in both these files. so:

--- a/lib/linter/pane.js
+++ b/lib/linter/pane.js
@@ -11,11 +11,11 @@
   name = 'LinterPane'

   static activate () {
-    subs = new CompositeDisposable()
+    this.subs = new CompositeDisposable()
   }

   static deactivate () {
-    subs.dispose()
+    this.subs.dispose()
   }

   constructor (opts) {
--- a/lib/linter/compiled-pane.js
+++ b/lib/linter/compiled-pane.js
@@ -12,11 +12,11 @@
   name = 'CompiledPane'

   static activate () {
-    subs = new CompositeDisposable()
+    this.subs = new CompositeDisposable()
   }

   static deactivate () {
-    subs.dispose()
+    this.subs.dispose()
   }

   constructor (opts) {
goyalyashpal commented 1 year ago

@Sertonix ping 😃

goyalyashpal commented 1 year ago

is this acceptable now @pfitzseb 😃 ?

goyalyashpal commented 1 year ago

Remaining steps: