Return empty programming language if no ACE mode is set

This commit is contained in:
Sebastian Serth
2022-10-06 00:25:22 +02:00
parent 9e1f2da02e
commit 065f93f79c

View File

@ -35,7 +35,7 @@ class FileType < ApplicationRecord
private :set_default_values
def programming_language
editor_mode.gsub('ace/mode/', '')
editor_mode&.gsub('ace/mode/', '')
end
def to_s