signalk-flags 1.1.2 → 1.1.3

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 +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-flags",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Country Flags plugin for Signal K server.",
5
5
  "main": "plugin/index.js",
6
6
  "signalk": {
package/plugin/index.js CHANGED
@@ -132,7 +132,10 @@ module.exports = (server) => {
132
132
  return;
133
133
  }
134
134
  u.values.forEach((v) => {
135
- if (v.path === '' && v.value && 'mmsi' in v.value) {
135
+ if (v.path === '' &&
136
+ v.value !== null &&
137
+ typeof v.value === 'object' &&
138
+ 'mmsi' in v.value) {
136
139
  // if doesn't already have flag property
137
140
  const vf = server.getPath(`${context}.flag`);
138
141
  if (!vf) {