applied some code style changes

This commit is contained in:
Andris Reinman 2017-03-10 14:14:38 +02:00
parent e34e07f61e
commit 020a77c78f
7 changed files with 196 additions and 126 deletions

View file

@ -23,10 +23,12 @@ router.get('/editor', passport.csrfProtection, (req, res) => {
return res.redirect('/');
}
resource.editorName = resource.editorName || 'grapejs';
resource.editorData = !resource.editorData
? { template: req.query.template || 'demo' }
: JSON.parse(resource.editorData);
resource.editorName = resource.editorName ||  'grapejs';
resource.editorData = !resource.editorData ?
{
template: req.query.template || 'demo'
} :
JSON.parse(resource.editorData);
if (!resource.html && !resource.editorData.html) {
try {