From 117b67fc9638fd337efcd01d47ca377b27064539 Mon Sep 17 00:00:00 2001 From: Michael Mulley Date: Thu, 21 Mar 2019 14:43:36 -0400 Subject: [PATCH] Don't set state to not-ready if the ready prop is true --- src/ReactPlaceholder.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ReactPlaceholder.tsx b/src/ReactPlaceholder.tsx index 3918ca3..c4c8643 100644 --- a/src/ReactPlaceholder.tsx +++ b/src/ReactPlaceholder.tsx @@ -97,7 +97,9 @@ export default class ReactPlaceholder extends React.Component { if (delay && delay > 0) { this.timeout = window.setTimeout(() => { - this.setState({ ready: false }); + if (!this.props.ready) { + this.setState({ ready: false }); + } }, delay); } else { this.setState({ ready: false });