From be3bc5cbd032c40db1e84b2d50caa75f639cee95 Mon Sep 17 00:00:00 2001 From: Beu Date: Thu, 3 Nov 2022 21:38:13 +0100 Subject: [PATCH] small hotfix --- BlocksItemsCounter/Source/BlocksItemsCounter.as | 2 +- BlocksItemsCounter/info.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BlocksItemsCounter/Source/BlocksItemsCounter.as b/BlocksItemsCounter/Source/BlocksItemsCounter.as index 78d4763..afe03e5 100644 --- a/BlocksItemsCounter/Source/BlocksItemsCounter.as +++ b/BlocksItemsCounter/Source/BlocksItemsCounter.as @@ -33,7 +33,7 @@ void Main() { RefreshBlocks(); RefreshItems(); sortableobjects = objects; - sortableobjects.Sort(function(a,b) { return a.size > b.size; }); // Sort by size by default, it will be used as second sort criteria + if (sortableobjects.Length > 0) sortableobjects.Sort(function(a,b) { return a.size > b.size; }); // Sort by size by default, it will be used as second sort criteria refreshobject = false; } yield(); diff --git a/BlocksItemsCounter/info.toml b/BlocksItemsCounter/info.toml index 2e96e29..7a48ee7 100644 --- a/BlocksItemsCounter/info.toml +++ b/BlocksItemsCounter/info.toml @@ -3,5 +3,5 @@ name = "Blocks & Items Counter" author = "Beu" category = "Map Editor" siteid = 97 -version = "1.4" +version = "1.5" blocks = [ "Plugin_Blocks&ItemsCounter" ]