Explorar el Código

Fixed NotepadA load json bug

Toby Chui hace 3 años
padre
commit
7d8b5992aa
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      web/NotepadA/ace/editor.html

+ 5 - 0
web/NotepadA/ace/editor.html

@@ -72,6 +72,11 @@
 					},300);
 					return
 				}
+
+				if (typeof fileContent == "object"){
+					//Loading a json file
+					fileContent = JSON.stringify(fileContent);
+				}
 				$("#editor").text(fileContent);
 
 				//Start the editor if not started