playbook_ui 14.3.0.pre.rc.9 → 14.3.0.pre.rc.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d27bc0773d0b2b97125ccaf0b86f53cc44090fc1e7e7c77c39027bd0be7dd093
4
- data.tar.gz: 5e4253b6ed65adcbe071d8581e9aa3b92b512a28aba751fe379d50f1587255c5
3
+ metadata.gz: 802ad05cc819086feec002c5a2528144dd9996654e668eccec3bc02beb2d6521
4
+ data.tar.gz: c0b4e44c40893d27244309b0e24ee3c8708746a91d15dffe565fe41e07d14b03
5
5
  SHA512:
6
- metadata.gz: 54b2d14f3b2d4aab0f1f8fa0fbf106ffe53fa504cc4e07c51cb840fafbfe5ed903bab2a6a30c77a9342dce1452998914b2fbb0261da01bf8a557e9e7b37bba46
7
- data.tar.gz: 879f68fe40a025427d08849c019874d9e62905d69020f478edfd8871781f0f5e2095d37748b3c986d0bab02c5ae56e2aa1c8382d4c2159af584ba7bdbefd3709
6
+ metadata.gz: 8e7a1200079126289d171fa6e6a26bda62b629aeef8ebcc880a28ca3a494d23810dc27a70a12bdb9a4081a98a8a37c7ae648b7f0c6a3d2552d7ee343c9b9fb5a
7
+ data.tar.gz: 3b89ba5afc4d031b92e19cae2ef8e3517e081d44784b135e49c0fff824f0ba576e505a57f230302ddee822c7428a1bbf4188853cf32d19b4273b5c6e52dcbd0c
@@ -102,6 +102,11 @@ module Playbook
102
102
  def render_svg
103
103
  doc = Nokogiri::XML(URI.open(asset_path || icon || custom_icon)) # rubocop:disable Security/Open
104
104
  svg = doc.at_css "svg"
105
+
106
+ unless svg
107
+ return "" # Return an empty string if SVG element is not found
108
+ end
109
+
105
110
  svg["class"] = %w[pb_custom_icon svg-inline--fa].concat([object.custom_icon_classname]).join(" ")
106
111
  svg["id"] = object.id
107
112
  svg["data"] = object.data
@@ -112,6 +117,9 @@ module Playbook
112
117
  fill_color = object.color || "currentColor"
113
118
  doc.at_css("path")["fill"] = fill_color
114
119
  raw doc
120
+ rescue OpenURI::HTTPError, StandardError
121
+ # Handle any exceptions and return an empty string
122
+ ""
115
123
  end
116
124
 
117
125
  def is_svg?
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.2.1"
5
- VERSION = "14.3.0.pre.rc.9"
5
+ VERSION = "14.3.0.pre.rc.10"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.3.0.pre.rc.9
4
+ version: 14.3.0.pre.rc.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX