We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 920ff55 commit a78fc2fCopy full SHA for a78fc2f
2020/day-7/bagRules.js
@@ -26,11 +26,9 @@ const findAllowedOuter = (rules, color) => {
26
27
// Loop through the rules, find all colors this bag is allowed within
28
rules.filter((rule) => {
29
- // console.debug(rule)
30
if (!rule.inner) { return false }
31
// match when inners contain the color
32
return (
33
- rule.inner &&
34
rule.inner.filter((child) => {
35
return (child.color === color)
36
}).length > 0
0 commit comments