diff --git a/lib/kiba/extend/transforms/replace.rb b/lib/kiba/extend/transforms/replace.rb index eb885249d..8d0534447 100644 --- a/lib/kiba/extend/transforms/replace.rb +++ b/lib/kiba/extend/transforms/replace.rb @@ -33,7 +33,12 @@ def initialize(source:, target:, mapping:, fallback_val: :orig, delete_source: t end def process(row) - origval = @multival ? row.fetch(@source).split(@sep) : [row.fetch(@source)] + rowval = row.fetch(@source, nil) + if rowval.nil? + origval = [rowval] + else + origval = @multival ? row.fetch(@source).split(@sep) : [row.fetch(@source)] + end newvals = [] origval.each do |oval| diff --git a/lib/kiba/extend/version.rb b/lib/kiba/extend/version.rb index b0793aeda..ab3206370 100644 --- a/lib/kiba/extend/version.rb +++ b/lib/kiba/extend/version.rb @@ -1,5 +1,5 @@ module Kiba module Extend - VERSION = "1.4.0" + VERSION = "1.4.1" end end