From 8c7aebbb88706995bb1f074a3e46a988770238ad Mon Sep 17 00:00:00 2001 From: Luka Murn Date: Mon, 5 Jun 2017 17:43:03 +0200 Subject: [PATCH] Fix bug with TinyMCE not working for steps with nil description Closes SCI-1321. --- app/helpers/tiny_mce_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers/tiny_mce_helper.rb b/app/helpers/tiny_mce_helper.rb index 0b9da187e..beef299e6 100644 --- a/app/helpers/tiny_mce_helper.rb +++ b/app/helpers/tiny_mce_helper.rb @@ -18,6 +18,7 @@ module TinyMceHelper end def generate_image_tag_from_token(text) + return nil if text.nil? regex = /\[~tiny_mce_id:([0-9a-zA-Z]+)\]/ text.gsub(regex) do |el| match = el.match(regex)