Fix doc when state is missing (#13049)
# Objective The warning mentions the function `add_state` which doesn't exist; replaced with `init_state`
This commit is contained in:
		
							parent
							
								
									54456b7ea6
								
							
						
					
					
						commit
						13cac2eeff
					
				| @ -752,7 +752,7 @@ pub mod common_conditions { | |||||||
|         move |current_state: Option<Res<State<S>>>| match current_state { |         move |current_state: Option<Res<State<S>>>| match current_state { | ||||||
|             Some(current_state) => *current_state == state, |             Some(current_state) => *current_state == state, | ||||||
|             None => { |             None => { | ||||||
|                 warn_once!("No state matching the type for {} exists - did you forget to `add_state` when initializing the app?", { |                 warn_once!("No state matching the type for {} exists - did you forget to `init_state` when initializing the app?", { | ||||||
|                         let debug_state = format!("{state:?}"); |                         let debug_state = format!("{state:?}"); | ||||||
|                         let result = debug_state |                         let result = debug_state | ||||||
|                             .split("::") |                             .split("::") | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Charles Bournhonesque
						Charles Bournhonesque