on master help sign in
fix parsing of type names in websocket client library
commit4dd599b401a68134061d956aa4d27c68fd7b05be authorAgentM <agentm@themactionfaction.com> dateWed 24 Aug 2016, 12:56 (10 years ago) parent4db1312
1 file changed+3−6
src/bin/ProjectM36/Server/WebSocket/project-m36.js+3−6
src/bin/ProjectM36/Server/WebSocket/project-m36.js+3−6
@@ -110,11 +110,7 @@ ProjectM36Connection.prototype.generateAtomType = function(attr)
110110 var attrName = attr[0];
111111 var element = document.createElement("span");
112112 element.textContent = attrName + "::";
113− if(atomType == "AtomType")
114− {
115− element.textContent += attr[1]["contents"]["serialrep"][0][2];
116− }
117− else if (atomType == "RelationAtomType")
113+ if (atomType == "RelationAtomType")
118114 {
119115 var table = document.createElement("table");
120116 element.appendChild(table);
@@ -133,7 +129,8 @@ ProjectM36Connection.prototype.generateAtomType = function(attr)
133129 }
134130 else
135131 {
136− element.textContent = "unknown";
132+ var readableType = atomType.slice(0,-8);
133+ element.textContent += readableType;
137134 }
138135 return element
139136}