Back out ad7767a9f3ea
authorKim Alvefur <zash@zash.se>
Wed, 05 Jan 2022 00:06:24 +0100
changeset 4852 5001104f0275
parent 4851 a280878c4ef2
child 4853 192b7aaa3888
Back out ad7767a9f3ea Turns out it does error on 0.11 because it tries to compare a number with the string "max" Thanks Marcel
mod_bookmarks2/mod_bookmarks2.lua
--- a/mod_bookmarks2/mod_bookmarks2.lua	Tue Jan 04 23:22:31 2022 +0100
+++ b/mod_bookmarks2/mod_bookmarks2.lua	Wed Jan 05 00:06:24 2022 +0100
@@ -20,7 +20,7 @@
 	["access_model"] = "whitelist";
 };
 
-if not mod_pep.check_node_config(nil, nil, default_options) then
+if not pcall(mod_pep.check_node_config, nil, nil, default_options) then
 	-- 0.11 or earlier not supporting max_items="max" trows an error here
 	module:log("debug", "Setting max_items=pep_max_items because 'max' is not supported in this version");
 	default_options["max_items"] = module:get_option_number("pep_max_items", 256);