signalk-polar-performance-plugin 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/plugin/index.js +9 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-polar-performance-plugin",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "description": "A plugin that calculates performance information based on a (CSV) polar diagram.",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {
package/plugin/index.js CHANGED
@@ -88,7 +88,6 @@ module.exports = function (app) {
88
88
  plugin.start = function (options, restartPlugin) {
89
89
  // Here we put our plugin logic
90
90
  app.debug('Plugin started');
91
- var unsubscribes = [];
92
91
  app.debug('Options: %s', JSON.stringify(options))
93
92
 
94
93
  // Load polar table
@@ -728,16 +727,15 @@ module.exports = function (app) {
728
727
 
729
728
  plugin.stop = function () {
730
729
  // Here we put logic we need when the plugin stops
731
- app.debug('Plugin stopped');
732
- plugin.stop = function () {
733
- unsubscribes.forEach(f => f());
734
- unsubscribes = [];
735
- timers.forEach(timer => {
736
- clearInterval(timer)
737
- })
738
- };
739
-
740
- };
730
+ app.debug('Plugin stopped')
731
+ app.debug('unsubscribes before: %s', JSON.stringify(unsubscribes))
732
+ unsubscribes.forEach(f => f())
733
+ unsubscribes = []
734
+ app.debug('unsubscribes after: %s', JSON.stringify(unsubscribes))
735
+ timers.forEach(timer => {
736
+ clearInterval(timer)
737
+ })
738
+ }
741
739
 
742
740
  return plugin;
743
741
  };