lib/lookbook/param.rb in lookbook-2.0.5 vs lib/lookbook/param.rb in lookbook-2.1.0
- old
+ new
@@ -26,10 +26,10 @@
def value
val = @value || value_default
if value_type == "datetime"
formatter = (input == "datetime-local") ? "%Y-%m-%dT%T" : "%Y-%m-%d"
- StringValueCaster.call(val, "datetime").strftime(formatter)
+ StringValueCaster.call(val, "datetime")&.strftime(formatter)
else
val
end
end