From cc2c491509c522d4d38c36fef2b13d79bf9d0b2d Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Wed, 22 Apr 2015 00:34:18 -0700 Subject: [PATCH] allow missing titles --- server/harp_blog.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/harp_blog.rb b/server/harp_blog.rb index 6068cc3..fd90972 100644 --- a/server/harp_blog.rb +++ b/server/harp_blog.rb @@ -86,10 +86,7 @@ class HarpBlog def create_post(title, body, url, extra_fields = nil) if !title || title.strip.length == 0 - title = find_title(url) - end - unless title - raise "cannot find title for #{url}" + title = url && find_title(url) or 'Untitled' end extra_fields ||= {} fields = extra_fields.merge({