Pārlūkot izejas kodu

Fixed NotepadA load json bug

Toby Chui 3 gadi atpakaļ
vecāks
revīzija
7d8b5992aa
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  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