From 2bf9360bb7edf811d236c8f6ffdd82959a28ff21 Mon Sep 17 00:00:00 2001 From: Ko Nagase Date: Fri, 23 Aug 2024 12:12:03 +0900 Subject: [PATCH] Replace removed jQuery api '.size()' to '.length' --- app/views/issue_resource_items/create.js.erb | 2 +- app/views/issue_supply_items/create.js.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/issue_resource_items/create.js.erb b/app/views/issue_resource_items/create.js.erb index f3dad28..35881e2 100644 --- a/app/views/issue_resource_items/create.js.erb +++ b/app/views/issue_resource_items/create.js.erb @@ -1,7 +1,7 @@ var wrapper = $('#<%= @issue_resource_items.first.resource_item.class.name.underscore %>_resource_item_list'); <% @issue_resource_items.each do |item| %> var i = $('#<%= j dom_id item.resource_item %>'); - if(i.size() == 0){ + if(i.length == 0){ wrapper.append('<%= j issue_resource_item_form_tag item %>'); } <% end %> diff --git a/app/views/issue_supply_items/create.js.erb b/app/views/issue_supply_items/create.js.erb index cb904b9..383a689 100644 --- a/app/views/issue_supply_items/create.js.erb +++ b/app/views/issue_supply_items/create.js.erb @@ -1,6 +1,6 @@ <% @issue_supply_items.each do |i| %> var wrap = $("#issue-form #<%= dom_id i.supply_item %>_wrap"); - if (wrap.size() > 0) { + if (wrap.length > 0) { var quantity = wrap.find('input').val(); if (quantity) { quantity = parseFloat(quantity);