Commit a97a29c7 authored by Julian Stirling's avatar Julian Stirling 🐧
Browse files

Apply 1 suggestion(s) to 1 file(s)

parent 9a03b113
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ function key_lookup(key, dict, default=undef) =
        // key is in [] because otherwise openscad will search for each letter rather than the string.
        index = search([key], dict, 1, 0)[0]
    // There must be a key match or a default value
    ) assert (index!=[] || !is_undef(default), "Key lookup failed, key not found!")
    ) assert (index!=[] || !is_undef(default), "Key lookup failed, key not found and no default given!")
      // return value from the dict if key matches, else return a default value.
      index!=[] ? dict[index][1] : default;