Skip to content

Commit

Permalink
empty options are cleared out before joining json_options, which caus…
Browse files Browse the repository at this point in the history
…es some browsers to die when parsing the json
  • Loading branch information
Rachot Moragraan committed Feb 11, 2010
1 parent dbaae89 commit 34cc321
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tiny_mce/configuration.rb
Expand Up @@ -81,7 +81,7 @@ def to_json options={},raw_options=''
json_options += @raw_options unless @raw_options.blank?
json_options << raw_options unless raw_options.blank?

"{\n" + json_options*",\n" + "\n\n}"
"{\n" + json_options.delete_if {|o| o.blank? }.join(",\n") + "\n\n}"
end

def self.valid_options_path
Expand Down

0 comments on commit 34cc321

Please sign in to comment.