From b03f4d8d5cfb617238389ed74c12ff5ac1328145 Mon Sep 17 00:00:00 2001 From: Dushnilin Date: Wed, 2 Sep 2026 08:05:19 +0300 Subject: [PATCH] fix(subscription): fix read_json_file -> read_json in section_cache_has_outbounds Incorrect function name caused a Type error crash in CI: 'left-hand side is not a function' Also replace for-in early-return trick with object_key_count() which already exists in this file (see line 1145). --- tachyon/files/usr/lib/subscription/cache.uc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tachyon/files/usr/lib/subscription/cache.uc b/tachyon/files/usr/lib/subscription/cache.uc index bb297ed7..faed598e 100644 --- a/tachyon/files/usr/lib/subscription/cache.uc +++ b/tachyon/files/usr/lib/subscription/cache.uc @@ -332,13 +332,11 @@ function cache_keep_sets(sections) { } function section_cache_has_outbounds(section_cache_path) { - let data = read_json_file(section_cache_path); + let data = read_json(section_cache_path); if (type(data) != "object") return false; let names = object_or_empty(object_or_empty(data.outboundMetadata).names); - for (let k in names) - return true; - return false; + return object_key_count(names) > 0; } function section_has_source_cache(name, section) {