Remove pointless DOM call

bbe62527d2ab9dde785ce38cac9998218c052ae3

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -5Ignore whitespace
public/scripts/world-info.js+2 -5
@@ -1942,7 +1942,6 @@ function clearEntryList() {
1942 console.time('clearEntryList');1942 console.time('clearEntryList');
1943 const $list = $('#world_popup_entries_list');1943 const $list = $('#world_popup_entries_list');
19441944
1945
1946 if (!$list.children().length) {1945 if (!$list.children().length) {
1947 console.debug('List already empty, skipping cleanup.');1946 console.debug('List already empty, skipping cleanup.');
1948 console.timeEnd('clearEntryList');1947 console.timeEnd('clearEntryList');
@@ -1977,7 +1976,6 @@ function clearEntryList() {
19771976
1978 $select.off();1977 $select.off();
1979 $.cleanData([$select[0]]);1978 $.cleanData([$select[0]]);
1980
1981 });1979 });
19821980
1983 // Step 3: Clean <div>, <span>, <input>1981 // Step 3: Clean <div>, <span>, <input>
@@ -1993,13 +1991,12 @@ function clearEntryList() {
1993 $list.sortable('destroy');1991 $list.sortable('destroy');
1994 }1992 }
19951993
1996 let totalElementsOfanyKindLeftInList = $list.children().length;1994 const totalElementsOfAnyKindLeftInList = $list.children().length;
19971995
1998 // Final cleanup1996 // Final cleanup
1999 if (totalElementsOfanyKindLeftInList !== 0) {1997 if (totalElementsOfAnyKindLeftInList) {
2000 console.time('empty');1998 console.time('empty');
2001 $list.empty();1999 $list.empty();
2002 totalElementsOfanyKindLeftInList = $list.children().length;
2003 console.timeEnd('empty');2000 console.timeEnd('empty');
2004 }2001 }
20052002