0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-13 21:42:53 +01:00

Template should return nil if there is wizard data

Dieser Commit ist enthalten in:
Angus McLeod 2018-05-11 10:43:00 +10:00
Ursprung 9a3ae6406f
Commit 1442bfe898

Datei anzeigen

@ -16,6 +16,9 @@ class CustomWizard::Template
def initialize(data) def initialize(data)
data = data.is_a?(String) ? ::JSON.parse(data) : data data = data.is_a?(String) ? ::JSON.parse(data) : data
return nil if data.blank?
@id = data['id'] @id = data['id']
@name = data['name'] @name = data['name']
@steps = data['steps'] @steps = data['steps']