Преглед изворни кода

Fixed NotepadA load json bug

Toby Chui пре 3 година
родитељ
комит
7d8b5992aa
1 измењених фајлова са 5 додато и 0 уклоњено
  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