From e9fcbd5a9905e5a1ed44193a618fd2edc9cc3a1c Mon Sep 17 00:00:00 2001 From: Mark Moffat <mark@Marks-MacBook-Pro-2.local> Date: Tue, 28 Jan 2020 17:01:28 +1030 Subject: [PATCH] Fixed SOE breaking the admin --- app.js | 2 +- views/layouts/layout.hbs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 0f48374..3b67641 100644 --- a/app.js +++ b/app.js @@ -316,7 +316,7 @@ handlebars = handlebars.create({ return''; }, snip: (text) => { - if(text.length > 155){ + if(text && text.length > 155){ return text.substring(0, 155) + '...'; } return text; diff --git a/views/layouts/layout.hbs b/views/layouts/layout.hbs index 5460b5b..f9b27fd 100644 --- a/views/layouts/layout.hbs +++ b/views/layouts/layout.hbs @@ -106,6 +106,7 @@ {{else}} <meta property="twitter:url" content="{{config.baseUrl}}" /> {{/if}} + {{#unless result.productTitle}} <script type="application/ld+json"> { "@context": "https://schema.org/", @@ -139,7 +140,7 @@ {{/if}} } </script> - + {{/unless}} <!-- SEO data --> {{~#if config.googleAnalytics}}{{{config.googleAnalytics}}}{{/if}} {{~#if config.customCss}}<style>{{{config.customCss}}}</style>{{/if}}