From 14c05b3c9826470e92f7a580b55d4cbef9c10c1b Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 2 Apr 2020 07:30:26 +0000
Subject: [PATCH] If only 2 arguments are passed to userprops.set(), assume the
 caller won't to set the entire section/object all in one go. This is more
 intuitive than the (still supported) userprops.set(section, null, object)
 syntax.

---
 exec/load/userprops.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/exec/load/userprops.js b/exec/load/userprops.js
index 5f303dd947..6db58d81db 100644
--- a/exec/load/userprops.js
+++ b/exec/load/userprops.js
@@ -44,6 +44,8 @@ function set(section, key, value, usernum)
 	var result;
 	if(!section)
 		result = file.iniSetAllObjects(value);
+	else if(value === undefined)
+		result = file.iniSetObject(section, key);
 	else if(!key)
 		result = file.iniSetObject(section, value);
 	else
-- 
GitLab