Remove pointless DOM call
| @@ -1942,7 +1942,6 @@ function clearEntryList() { | ||
| 1942 | 1942 | console.time('clearEntryList'); |
| 1943 | 1943 | const $list = $('#world_popup_entries_list'); |
| 1944 | 1944 | |
| 1945 | - | |
| 1946 | 1945 | if (!$list.children().length) { |
| 1947 | 1946 | console.debug('List already empty, skipping cleanup.'); |
| 1948 | 1947 | console.timeEnd('clearEntryList'); |
| @@ -1977,7 +1976,6 @@ function clearEntryList() { | ||
| 1977 | 1976 | |
| 1978 | 1977 | $select.off(); |
| 1979 | 1978 | $.cleanData([$select[0]]); |
| 1980 | - | |
| 1981 | 1979 | }); |
| 1982 | 1980 | |
| 1983 | 1981 | // Step 3: Clean <div>, <span>, <input> |
| @@ -1993,13 +1991,12 @@ function clearEntryList() { | ||
| 1993 | 1991 | $list.sortable('destroy'); |
| 1994 | 1992 | } |
| 1995 | 1993 | |
| 1996 | 1994 | letconst totalElementsOfanyKindLeftInListtotalElementsOfAnyKindLeftInList = $list.children().length; |
| 1997 | 1995 | |
| 1998 | 1996 | // Final cleanup |
| 1999 | 1997 | if (totalElementsOfanyKindLeftInList !== 0totalElementsOfAnyKindLeftInList) { |
| 2000 | 1998 | console.time('empty'); |
| 2001 | 1999 | $list.empty(); |
| 2002 | - totalElementsOfanyKindLeftInList = $list.children().length; | |
| 2003 | 2000 | console.timeEnd('empty'); |
| 2004 | 2001 | } |
| 2005 | 2002 | |