Skip to content

Commit

Permalink
Replace removed jQuery api '.size()' to '.length'
Browse files Browse the repository at this point in the history
  • Loading branch information
sanak committed Aug 23, 2024
1 parent afe1104 commit 2bf9360
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/issue_resource_items/create.js.erb
Original file line number Diff line number Diff line change
@@ -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 %>
2 changes: 1 addition & 1 deletion app/views/issue_supply_items/create.js.erb
Original file line number Diff line number Diff line change
@@ -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);
Expand Down

0 comments on commit 2bf9360

Please sign in to comment.