From 046452bd55c3032d014723cae1a8a9ae6ce8509d Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 13 Feb 2023 20:38:47 -0500 Subject: [PATCH] Make "deprecated" an alias of "hidden" in Model JSON object. --- src/plugin/Model.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugin/Model.cpp b/src/plugin/Model.cpp index 31ef3f53..a8d125c9 100644 --- a/src/plugin/Model.cpp +++ b/src/plugin/Model.cpp @@ -62,9 +62,12 @@ void Model::fromJson(json_t* rootJ) { // hidden json_t* hiddenJ = json_object_get(rootJ, "hidden"); - // Use `disabled` as an alias which was deprecated in Rack 2.0 + // "disabled" was a deprecated alias in Rack <2 if (!hiddenJ) hiddenJ = json_object_get(rootJ, "disabled"); + // "deprecated" was a deprecated alias in Rack <2.2.4 + if (!hiddenJ) + hiddenJ = json_object_get(rootJ, "deprecated"); if (hiddenJ) { // Don't un-hide Model if already hidden by C++ if (json_boolean_value(hiddenJ))