mirror of
				https://gitea.invidious.io/iv-org/invidious.git
				synced 2024-08-15 00:53:41 +00:00 
			
		
		
		
	Fix from_yaml in ConfigPreferences
This commit is contained in:
		
							parent
							
								
									5ef288b840
								
							
						
					
					
						commit
						31312747e9
					
				
					 2 changed files with 8 additions and 8 deletions
				
			
		|  | @ -17,12 +17,12 @@ struct ConfigPreferences | ||||||
|         end |         end | ||||||
| 
 | 
 | ||||||
|         result = [] of String |         result = [] of String | ||||||
|         node.nodes.each do |         node.nodes.each do |item| | ||||||
|           unless node.is_a?(YAML::Nodes::Scalar) |           unless item.is_a?(YAML::Nodes::Scalar) | ||||||
|             node.raise "Expected scalar, not #{node.class}" |             node.raise "Expected scalar, not #{item.class}" | ||||||
|           end |           end | ||||||
| 
 | 
 | ||||||
|           result << node.value |           result << item.value | ||||||
|         end |         end | ||||||
|       rescue ex |       rescue ex | ||||||
|         if node.is_a?(YAML::Nodes::Scalar) |         if node.is_a?(YAML::Nodes::Scalar) | ||||||
|  |  | ||||||
|  | @ -64,12 +64,12 @@ struct Preferences | ||||||
|         end |         end | ||||||
| 
 | 
 | ||||||
|         result = [] of String |         result = [] of String | ||||||
|         node.nodes.each do |         node.nodes.each do |item| | ||||||
|           unless node.is_a?(YAML::Nodes::Scalar) |           unless item.is_a?(YAML::Nodes::Scalar) | ||||||
|             node.raise "Expected scalar, not #{node.class}" |             node.raise "Expected scalar, not #{item.class}" | ||||||
|           end |           end | ||||||
| 
 | 
 | ||||||
|           result << node.value |           result << item.value | ||||||
|         end |         end | ||||||
|       rescue ex |       rescue ex | ||||||
|         if node.is_a?(YAML::Nodes::Scalar) |         if node.is_a?(YAML::Nodes::Scalar) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue