Przeglądaj źródła

Fixed NotepadA load json bug

Toby Chui 3 lat temu
rodzic
commit
7d8b5992aa
1 zmienionych plików z 5 dodań i 0 usunięć
  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