Jelajahi Sumber

Fixed NotepadA load json bug

Toby Chui 3 tahun lalu
induk
melakukan
7d8b5992aa
1 mengubah file dengan 5 tambahan dan 0 penghapusan
  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