소스 검색

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