From da9209c1ce59476115012574d1bfde0251de650e Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 24 Feb 2024 15:15:06 +1100 Subject: [PATCH] Content parsing --- slices/micropub/request_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slices/micropub/request_parser.rb b/slices/micropub/request_parser.rb index 0a78740..a1fc9d7 100644 --- a/slices/micropub/request_parser.rb +++ b/slices/micropub/request_parser.rb @@ -53,7 +53,7 @@ module Micropub new_params = if req_type == :json content = if params[:properties][:content] - if params[:properties][:content].is_a?(Array) && params[:properties][:content].first[:html] + if params[:properties][:content].is_a?(Array) && params[:properties][:content].first.is_a?(Hash) params[:properties][:content].first[:html] else params[:properties][:content].first&.tr("\n", " ")