Skip to content

Commit 61f368b

Browse files
committed
More bug fixes.
1 parent 7dcda71 commit 61f368b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

lib/plotrb/marks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def get_full_field_ref(field)
443443
extra_fields = (data.extra_fields if data) || []
444444
if field.to_s.start_with?('data.')
445445
field
446-
elsif extra_fields.include?(field.to_sym)
446+
elsif extra_fields.include?(field.split('.')[0].to_sym)
447447
classify(field, :json)
448448
else
449449
"data.#{field}"

lib/plotrb/scales.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ def get_data_ref_from_data(data)
285285
end
286286

287287
def is_data_ref?(ref)
288+
return false unless ref.is_a?(String)
288289
source, _ = ref.split('.', 2)
289290
not ::Plotrb::Kernel.find_data(source).nil?
290291
end

lib/plotrb/transforms.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ def attribute_post_processing
415415
process_truncate_value
416416
process_zip_key
417417
process_zip_with_key
418+
process_zip_as
418419
process_geo_lon
419420
process_geo_lat
420421
process_link_source
@@ -501,6 +502,11 @@ def process_zip_with_key
501502
@with_key = get_full_field_ref(@with_key)
502503
end
503504

505+
def process_zip_as
506+
return unless @type == :zip && @as
507+
@extra_fields.concat([@as.to_sym])
508+
end
509+
504510
def process_geo_lon
505511
return unless @type == :geo && @lon
506512
@lon = get_full_field_ref(@lon)

0 commit comments

Comments
 (0)