From 41e42246af9f94f09c62184fd982bc82418cbc2b Mon Sep 17 00:00:00 2001 From: Sonny George Date: Thu, 3 May 2018 11:12:50 -0700 Subject: [PATCH] check for term reference before accessing properties --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 45ea308..7e4623c 100644 --- a/index.js +++ b/index.js @@ -111,7 +111,7 @@ exports.decorateTerm = (Term, { React, notify }) => { _onDecorated (term) { if (this.props.onDecorated) this.props.onDecorated(term); - this._div = term.termRef; + this._div = term ? term.termRef : null; this._initCanvas(); }