Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/notion_api/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def extract_title(clean_id, jsonified_record_response)
else
# titles for images are called source, while titles for text-based blocks are called title, so lets dynamically grab it
# https://stackoverflow.com/questions/23765996/get-all-keys-from-ruby-hash/23766007
title_value = filter_nil_blocks[clean_id]["value"]["properties"].keys[0]
Core.type_whitelist.include?(filter_nil_blocks[clean_id]["value"]["type"]) ? nil : jsonified_record_response["block"][clean_id]["value"]["properties"][title_value].flatten[0]
title_key = 'title'
Core.type_whitelist.include?(filter_nil_blocks[clean_id]["value"]["type"]) ? nil : jsonified_record_response["block"][clean_id]["value"]["properties"][title_key].flatten[0]
end
end

Expand Down