fix error
This commit is contained in:
parent
1a6e46982c
commit
1d8b2b04b6
|
@ -116,7 +116,7 @@ if bundle_update_flag
|
||||||
puts "Checking announcement widgets"
|
puts "Checking announcement widgets"
|
||||||
widget_info = info["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
widget_info = info["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
||||||
update_flag = false
|
update_flag = false
|
||||||
last_index = widget_info[-1]["filename"].match(/\d+/)[0].to_i rescue nil
|
last_index = widget_info.collect{|v| v["filename"].to_s.scan(/\d+/).collect{|v1| v1.to_i}}.flatten.sort[-1] rescue nil
|
||||||
if !last_index.nil?
|
if !last_index.nil?
|
||||||
idx_regex = /^(\d+[\. \t]*)|[ \t]+$/
|
idx_regex = /^(\d+[\. \t]*)|[ \t]+$/
|
||||||
default_announcement_widget_info.each do |h|
|
default_announcement_widget_info.each do |h|
|
||||||
|
|
Loading…
Reference in New Issue