Skip to content

Commit 41f8f23

Browse files
committed
Fix old values
1 parent 8c2b80d commit 41f8f23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

web/js/betterCombos.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,11 @@ app.registerExtension({
469469
const modelCb = modelWidget.callback;
470470
let prev = undefined;
471471
modelWidget.callback = function () {
472-
const ret = modelCb?.apply(this, arguments) ?? modelWidget.value;
472+
let ret = modelCb?.apply(this, arguments) ?? modelWidget.value;
473+
if ("content" in ret) {
474+
ret = ret.content;
475+
modelWidget.value = ret;
476+
}
473477
let v = ret;
474478
if (prev !== v) {
475479
listExamples();

0 commit comments

Comments
 (0)