Pārlūkot izejas kodu

toxml: rem. ns=0 in nodeid toString

Martin Kunz 1 mēnesi atpakaļ
vecāks
revīzija
6b89180121
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      src/ua/NodeId.ts

+ 4 - 1
src/ua/NodeId.ts

@@ -143,7 +143,10 @@ export class NodeId {
         const _this = this as INodeId;
         switch (_this.identifierType) {
             case NodeIdType.NUMERIC:
-                str = "ns=" + this.namespace + ";i=" + _this.value;
+                if(this.namespace===0)
+                    str = "i=" + _this.value;
+                else
+                    str = "ns=" + this.namespace + ";i=" + _this.value;
                 break;
             case NodeIdType.STRING:
                 str = "ns=" + this.namespace + ";s=" + _this.value;