From 3bebcaf7b1ed98f054b9189a2339f3d0f6d0c134 Mon Sep 17 00:00:00 2001 From: Bohung Date: Wed, 9 Jun 2021 14:38:43 +0800 Subject: [PATCH] Fix bug. --- announcement.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/announcement.gemspec b/announcement.gemspec index 49ae6e1..07b80fe 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -115,7 +115,7 @@ if bundle_update_flag default_announcement_widget_info.each do |h| name_without_index = h["name"]["zh_tw"].sub(/\d+/,'') widget_info_index = (widget_info.index{|hh| hh["name"]["zh_tw"].include?(name_without_index)} rescue -1) - if widget_info_index == -1 + if (widget_info_index == -1 || widget_info_index.nil?) update_flag = true copy_h = h.dup h.delete("force_cover")