saviola777 / haxball-headless-manager

Suite of management scripts for headless haxball hosts, including plugins with dependency management
MIT License
7 stars 3 forks source link

First time onConfigSet the oldValue is undefined #14

Closed morko closed 5 years ago

morko commented 5 years ago

Expected the oldValue to contain the value set initially room.pluginSpec.config but instead it was undefined.

saviola777 commented 5 years ago

Did your event conain a paramName? If there is a paramName, the oldValue should be correct. If it does not contain a paramName, then oldValue will always be undefined (can happen if the pluginSpec was set, for example, indicating that the whole config, or at least more than one parameter, was changed). How exactly does your onConfigSet handler look like? This problem can most likely be fixed by checking for the correct paramName first.

morko commented 5 years ago

Unfortunately I cannot seem to be able reproduce this.