Skip to content

Commit 5cb3650

Browse files
author
Michael Dijkstra
committed
Fix default idlePeriod assignment
Default idlePeriod was overriding `0`
1 parent 6908903 commit 5cb3650

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const LiveChatLoaderContext = createContext()
88
export const LiveChatLoaderProvider = ({
99
providerKey,
1010
provider,
11-
idlePeriod = 5000,
11+
idlePeriod,
1212
children
1313
}) => {
1414
const [state, setState] = useState(STATES.INITIAL)
@@ -38,6 +38,10 @@ export const LiveChatLoaderProvider = ({
3838
)
3939
}
4040

41+
LiveChatLoaderProvider.defaultProps = {
42+
idlePeriod: 5000
43+
}
44+
4145
export { default as useChat } from './hooks/useChat'
4246
export { default as HelpScout } from './components/HelpScout'
4347
export { default as Intercom } from './components/Intercom'

0 commit comments

Comments
 (0)