mirror of
				https://github.com/iv-org/invidious.git
				synced 2025-11-04 06:31:57 +00:00 
			
		
		
		
	Fix from_yaml in ConfigPreferences
This commit is contained in:
		@@ -17,12 +17,12 @@ struct ConfigPreferences
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        result = [] of String
 | 
			
		||||
        node.nodes.each do
 | 
			
		||||
          unless node.is_a?(YAML::Nodes::Scalar)
 | 
			
		||||
            node.raise "Expected scalar, not #{node.class}"
 | 
			
		||||
        node.nodes.each do |item|
 | 
			
		||||
          unless item.is_a?(YAML::Nodes::Scalar)
 | 
			
		||||
            node.raise "Expected scalar, not #{item.class}"
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          result << node.value
 | 
			
		||||
          result << item.value
 | 
			
		||||
        end
 | 
			
		||||
      rescue ex
 | 
			
		||||
        if node.is_a?(YAML::Nodes::Scalar)
 | 
			
		||||
 
 | 
			
		||||
@@ -64,12 +64,12 @@ struct Preferences
 | 
			
		||||
        end
 | 
			
		||||
 | 
			
		||||
        result = [] of String
 | 
			
		||||
        node.nodes.each do
 | 
			
		||||
          unless node.is_a?(YAML::Nodes::Scalar)
 | 
			
		||||
            node.raise "Expected scalar, not #{node.class}"
 | 
			
		||||
        node.nodes.each do |item|
 | 
			
		||||
          unless item.is_a?(YAML::Nodes::Scalar)
 | 
			
		||||
            node.raise "Expected scalar, not #{item.class}"
 | 
			
		||||
          end
 | 
			
		||||
 | 
			
		||||
          result << node.value
 | 
			
		||||
          result << item.value
 | 
			
		||||
        end
 | 
			
		||||
      rescue ex
 | 
			
		||||
        if node.is_a?(YAML::Nodes::Scalar)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user