pinokiod 3.254.0 → 3.256.0

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/server/index.js +15 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.254.0",
3
+ "version": "3.256.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -3749,11 +3749,21 @@ class Server {
3749
3749
  async start(options) {
3750
3750
  this.debug = false
3751
3751
  if (options) {
3752
- this.debug = options.debug
3753
- this.browser = options.browser
3754
- this.onrestart = options.onrestart
3755
- this.onquit = options.onquit
3756
- this.onrefresh = options.onrefresh
3752
+ if (Object.prototype.hasOwnProperty.call(options, 'debug')) {
3753
+ this.debug = options.debug
3754
+ }
3755
+ if (Object.prototype.hasOwnProperty.call(options, 'browser')) {
3756
+ this.browser = options.browser
3757
+ }
3758
+ if (typeof options.onrestart === 'function') {
3759
+ this.onrestart = options.onrestart
3760
+ }
3761
+ if (typeof options.onquit === 'function') {
3762
+ this.onquit = options.onquit
3763
+ }
3764
+ if (typeof options.onrefresh === 'function') {
3765
+ this.onrefresh = options.onrefresh
3766
+ }
3757
3767
  }
3758
3768
 
3759
3769
  if (this.listening) {