From 08fafcf2ee03839ffb7b27b1450b9713ab147d72 Mon Sep 17 00:00:00 2001 From: Ludwig Schubert Date: Mon, 21 Aug 2017 18:43:58 -0700 Subject: [PATCH] Fix: crash if no byline was present --- src/controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controller.js b/src/controller.js index 4b1fd66..bd70002 100644 --- a/src/controller.js +++ b/src/controller.js @@ -113,7 +113,9 @@ export const Controller = { } const byline = document.querySelector('d-byline'); - byline.frontMatter = frontMatter; + if (byline) { + byline.frontMatter = frontMatter; + } }, DOMContentLoaded() {