function clearAllMessages(store) {
	const msgs = store.getState().get('messages');
	if (msgs && msgs.size > 0) store.dispatch(clearMessages());
}
function clearAllMessages(store) {
	const msgs = store.getState().get('messages');
	if (msgs && msgs.size > 0) store.dispatch(clearMessages());
}
function clearAllMessages ( store ) { const msgs = store . getState ( ) . get ( 'messages' ) ; if ( msgs && msgs . size > 0 ) store . dispatch ( clearMessages ( ) ) ; }
Clears all messages if messages exist. Call from route.onChange().
@param store - Redux store
Clears all messages if messages exist . Call from route . onChange () .