summaryrefslogtreecommitdiff
path: root/script-beta/core/definition.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script-beta/core/definition.lua')
-rw-r--r--script-beta/core/definition.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua
index ae6dce4a..8e76bfab 100644
--- a/script-beta/core/definition.lua
+++ b/script-beta/core/definition.lua
@@ -7,8 +7,8 @@ local findSource = require 'core.find-source'
local function sortResults(results)
-- 先按照顺序排序
table.sort(results, function (a, b)
- local u1 = guide.getRoot(a.target).uri
- local u2 = guide.getRoot(b.target).uri
+ local u1 = guide.getUri(a.target)
+ local u2 = guide.getUri(b.target)
if u1 == u2 then
return a.target.start < b.target.start
else
@@ -20,8 +20,7 @@ local function sortResults(results)
for i = #results, 1, -1 do
local res = results[i].target
local f = res.finish
- local root = guide.getRoot(res)
- local uri = root and root.uri
+ local uri = guide.getUri(res)
if lf and f > lf and uri == lu then
table.remove(results, i)
else