瀏覽代碼

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