[Kimchi-devel] [PATCH] Clear out the guests list properly using jQuery

Adam King rak at linux.vnet.ibm.com
Tue Feb 25 00:34:29 UTC 2014


Clear out the guests list properlt using jQuery empty().
Setting the html to '' as previous can result in browser memory leaks.

Signed-off-by: Adam King <rak at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.guest_main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index b5e7af3..e350373 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -137,7 +137,7 @@ kimchi.listVmsAuto = function() {
                 var guestTemplate = kimchi.guestTemplate;
                 var currentConsoleImages = kimchi.getVmsCurrentConsoleImgs();
                 var openMenuGuest = kimchi.getOpenMenuVmId();
-                $('#guestList').html('');
+                $('#guestList').empty();
                 $('#guestListField').show();
                 $('#noGuests').hide();
 
-- 
1.8.1.4




More information about the Kimchi-devel mailing list