Skip to content

Commit 66efd66

Browse files
authored
Update live-view.js
1 parent 69c6010 commit 66efd66

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

live-view/live-view.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,7 @@ async function setupLiveView() {
104104
// show file content in codeit
105105
try {
106106

107-
const fileContent = decodeUnicode(selectedFile.content);
108-
109-
// compare current code with new code
110-
if (hashCode(cd.textContent) !== hashCode(fileContent)) {
111-
112-
// if code is different, swap it
113-
cd.textContent = fileContent;
114-
115-
}
107+
cd.textContent = decodeUnicode(selectedFile.content);
116108

117109
// change codeit lang
118110
cd.lang = selectedFile.lang;
@@ -1058,4 +1050,3 @@ async function asyncForEach(array, callback) {
10581050
await callback(array[index], index, array);
10591051
}
10601052
}
1061-

0 commit comments

Comments
 (0)