diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-03-13 14:39:49 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-03-13 14:40:59 +0100 |
commit | e812ada4db11536fd8ddfb67410c436d792909b1 (patch) | |
tree | 3e9cbdf3cfa38adbde0b0145099ecf64fa695c13 /server.js | |
parent | 918691acfc7bd4b4f197c41926068f0d086279ac (diff) | |
download | server-e812ada4db11536fd8ddfb67410c436d792909b1.tar.gz |
Handle non-string option values in option_to_english.
Diffstat (limited to 'server.js')
-rw-r--r-- | server.js | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1146,7 +1146,9 @@ function option_to_english(k) { return "yes" if (k === false) return "no" - return k.replace(/_/g, " ").replace(/^\w/, (c) => c.toUpperCase()) + if (typeof k === "string") + return k.replace(/_/g, " ").replace(/^\w/, (c) => c.toUpperCase()) + return k } function format_options(options_json, options) { |