Explorar o código

Fixed NotepadA load json bug

Toby Chui %!s(int64=3) %!d(string=hai) anos
pai
achega
7d8b5992aa
Modificáronse 1 ficheiros con 5 adicións e 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