100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
solve a bug where the entire map pin wouldn't render if direction attr had no valid value
Vincenta1f15bd55c68
diff --git a/ui/component/or-map/src/markers/or-map-marker-asset.ts b/ui/component/or-map/src/markers/or-map-marker-asset.tsindex 4051c44c7..bd4561ed9 100644--- a/ui/component/or-map/src/markers/or-map-marker-asset.ts+++ b/ui/component/or-map/src/markers/or-map-marker-asset.ts@@ -148,7 +148,10 @@ export class OrMapMarkerAsset extends subscribe(manager)(OrMapMarker) {this._updateLocation(attr ? attr.value as GeoJSONPoint : null);if (asset.attributes && asset.attributes[WellknownAttributes.DIRECTION]) {- this.direction = (await this.getAttrValue(asset, WellknownAttributes.DIRECTION))!.toString() || undefined;+ const directionVal = await this.getAttrValue(asset, WellknownAttributes.DIRECTION);+ if (directionVal !== undefined) {+ this.direction = directionVal.toString();+ }}if (this.config && asset.type && this.config[asset.type]) {