Fix type error

pull/1/head
yflory 4 years ago
parent c28cf20464
commit 9a1a1830fc

@ -661,9 +661,6 @@ define([
framework.onReady(function (isNew) {
var priv = metadataMgr.getPrivateData();
var $container = $('#cp-app-form-container');
$container.append(makeFormCreator());
if (APP.isEditor) {
if (!content.form) {
content.form = {};
@ -683,6 +680,9 @@ define([
}
}
var $container = $('#cp-app-form-container');
$container.append(makeFormCreator());
if (!content.answers || !content.answers.channel || !content.answers.publicKey || !content.answers.validateKey) {
return void UI.errorLoadingScreen(Messages.form_invalid);
}

@ -21,7 +21,7 @@ define([
var keys = Utils.secret && Utils.secret.keys;
var parsed = Utils.Hash.parseTypeHash('pad', hash.slice(1));
if (parsed.auditorKey) {
if (parsed && parsed.auditorKey) {
meta.form_auditorKey = parsed.auditorKey;
meta.form_auditorHash = hash;
}

Loading…
Cancel
Save