From 1bc054903ce06879b34422d316bceec457e129a9 Mon Sep 17 00:00:00 2001 From: Matt Mo Date: Wed, 11 Aug 2021 10:46:44 -0700 Subject: [PATCH] Added null check to props. --- ignite-element.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ignite-element.js b/ignite-element.js index 8f905e6..1dae032 100644 --- a/ignite-element.js +++ b/ignite-element.js @@ -171,7 +171,9 @@ class IgniteElement extends HTMLElement { * Sets all the property values on this element. */ setProperties(props) { - Object.keys(props).forEach(name => this[name] = props[name]); + if (props) { + Object.keys(props).forEach(name => this[name] = props[name]); + } } /**