diff options
| author | Omar Roth <omarroth@hotmail.com> | 2019-04-03 19:04:33 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2019-04-03 19:04:33 -0500 |
| commit | 31312747e9052b0d856db37b53cc37e7aa2806a3 (patch) | |
| tree | a197c197817ea78bb77c6734e44ba4fc7e376f77 /src | |
| parent | 5ef288b840b0308ada72f625b09d15565fe5b0d0 (diff) | |
| download | invidious-31312747e9052b0d856db37b53cc37e7aa2806a3.tar.gz invidious-31312747e9052b0d856db37b53cc37e7aa2806a3.tar.bz2 invidious-31312747e9052b0d856db37b53cc37e7aa2806a3.zip | |
Fix from_yaml in ConfigPreferences
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/helpers/helpers.cr | 8 | ||||
| -rw-r--r-- | src/invidious/users.cr | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/invidious/helpers/helpers.cr b/src/invidious/helpers/helpers.cr index 792fec11..1fe41f80 100644 --- a/src/invidious/helpers/helpers.cr +++ b/src/invidious/helpers/helpers.cr @@ -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) diff --git a/src/invidious/users.cr b/src/invidious/users.cr index 80fc496c..40f24870 100644 --- a/src/invidious/users.cr +++ b/src/invidious/users.cr @@ -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) |
