Allow value to be mapped to be nil

This commit is contained in:
Chris Roberts 2022-01-11 10:23:08 -08:00 committed by Paul Hinze
parent 033dfba056
commit 2ff7d6a5bd
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -95,7 +95,7 @@ module VagrantPlugins
to = DEFAULT_MAPS[value.class] if to.nil?
# If the value given is the desired type, just return the value
return value if !value.nil? && !to.nil? && value.is_a?(to)
return value if !to.nil? && value.is_a?(to)
logger.debug("starting the value mapping process #{value.class} => #{to.nil? ? 'unknown' : to.inspect}")
if value.nil? && to