From 44ad5bcd8f269766057680d0328ba9a4ffeb4402 Mon Sep 17 00:00:00 2001 From: Suleyman Melikoglu Date: Mon, 5 Nov 2018 11:00:03 -0800 Subject: [PATCH] fix(Ref) Add a workaround for findDomNode to work with React 16.6.0 --- src/addons/Ref/Ref.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/addons/Ref/Ref.js b/src/addons/Ref/Ref.js index 47ba20f137..135724e2f3 100644 --- a/src/addons/Ref/Ref.js +++ b/src/addons/Ref/Ref.js @@ -24,8 +24,11 @@ export default class Ref extends Component { // Heads up! Don't move this condition, it's a short circuit that avoids run of `findDOMNode` // if `innerRef` isn't passed - // eslint-disable-next-line react/no-find-dom-node - if (innerRef) innerRef(findDOMNode(this)) + try { + // eslint-disable-next-line react/no-find-dom-node + if (innerRef) innerRef(findDOMNode(this)) + // eslint-disable-next-line no-empty + } catch (_) {} } render() {