From a42fa85faeb24d4a4d1a0fdf0d468cd8f4ddf267 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Mon, 27 Jan 2020 12:11:03 +0800 Subject: [PATCH] fix "search term not found" --- src/util/_impl/_sort_impl.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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