From 22e94c57739588394d1f945496a171e16b98c278 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Tue, 11 Dec 2018 22:49:13 -0600 Subject: [PATCH] Return early if provided term is not defined --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 4513567..4f1cc73 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,10 @@ exports.decorateTerm = (Term, { React, notify }) => { } onDecorated(term) { + if (!term) { + return; + } + if (this.props.onDecorated) { this.props.onDecorated(term); }