diff --git a/lib/custom_wizard/mapper.rb b/lib/custom_wizard/mapper.rb index 41519b07..4e18ad01 100644 --- a/lib/custom_wizard/mapper.rb +++ b/lib/custom_wizard/mapper.rb @@ -44,7 +44,7 @@ class CustomWizard::Mapper def initialize(params) @inputs = params[:inputs] || {} - @data = params[:data].with_indifferent_access || {} + @data = params[:data] ? params[:data].with_indifferent_access : {} @user = params[:user] @opts = params[:opts] || {} end @@ -269,7 +269,7 @@ class CustomWizard::Mapper result = data[k] if keys.empty? - result.is_a?(Object) ? "" : result + result.is_a?(Hash) ? "" : result else self.recurse(result, keys) end