diff --git a/src/util/_impl/_sort_impl.scad b/src/util/_impl/_sort_impl.scad index c63135f1..e2381c75 100644 --- a/src/util/_impl/_sort_impl.scad +++ b/src/util/_impl/_sort_impl.scad @@ -10,7 +10,7 @@ function _sort(lt, i) = function _sort_impl(lt, by, idx) = let( - dict = [["x", 0], ["y", 1], ["z", 0], ["idx", idx]], - i = dict[search(by, dict)[0]][1] + dict = [["x", 0], ["y", 1], ["z", 0], ["i", idx]], + i = dict[search(by == "idx" ? "i" : by, dict)[0]][1] ) _sort(lt, i); \ No newline at end of file