Skip to content

Commit c9e3700

Browse files
author
Rob Gries
committed
Add check for nil property
1 parent 8210357 commit c9e3700

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libraries/provider_cisco_interface.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ def set_layer3_combo_properties
130130
def set_layer2_properties
131131
# Disable switchport
132132
set_switchport_mode
133-
@new_resource.switchport_trunk_allowed_vlan.delete!(' ')
133+
@new_resource.switchport_trunk_allowed_vlan.delete!(' ') unless
134+
@new_resource.switchport_trunk_allowed_vlan.nil?
134135
prop_set([:access_vlan, :switchport_autostate_exclude,
135136
:switchport_trunk_allowed_vlan, :switchport_trunk_native_vlan,
136137
:switchport_vtp

0 commit comments

Comments
 (0)