[Kimchi-devel] [PATCH] [Kimchi 1/1] .size() is deprecated on JQuery 3.2.1

Aline Manera aline.manera at gmail.com
Thu Sep 7 21:53:38 UTC 2017


JQuery was updated on Wok and .size() is deprecated, so replace it to
.length property.

For reference: https://api.jquery.com/size/

Signed-off-by: Aline Manera <aline.manera at gmail.com>
---
 ui/js/src/kimchi.guest_edit_main.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index e9fdc078..d28a0891 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -205,7 +205,7 @@ kimchi.guest_edit_main = function() {
         var addItem = function(data) {
             var oriID = data.id;
             if (data.id === -1) {
-                data.id = $('#form-guest-edit-interface > .body').children().size();
+                data.id = $('#form-guest-edit-interface > .body').children().length;
             }
             if (data.ips === "" || data.ips === null || data.ips === undefined || data.ips.length === 0) {
                 data.ips = i18n["KCHNET6001M"];
-- 
2.13.5



More information about the Kimchi-devel mailing list