commit f9b69342f8eb457f708fcdd9c280ed8608a481e7
parent 50e405317e24be3b4ed5bbcc78e64ebc774c7cd1
Author: Sebastian <sebasjm@taler-systems.com>
Date: Mon, 9 Feb 2026 12:06:14 -0300
fix #11016: show debug info default to false
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/web-util/src/context/common-preferences.ts b/packages/web-util/src/context/common-preferences.ts
@@ -18,6 +18,7 @@ import {
buildCodecForObject,
Codec,
codecForBoolean,
+ codecOptionalDefault,
} from "@gnu-taler/taler-util";
import { ComponentChildren, createContext, h, VNode } from "preact";
import { useContext, useState } from "preact/hooks";
@@ -35,7 +36,7 @@ interface Type extends Preferences {
const codecForPreferences = (): Codec<Preferences> =>
buildCodecForObject<Preferences>()
.allowExtra()
- .property("showDebugInfo", codecForBoolean())
+ .property("showDebugInfo", codecOptionalDefault( codecForBoolean(), false))
.build("CommonPreferences");
const COMMON_PREFERENCES_KEY = buildStorageKey(
@@ -44,7 +45,7 @@ const COMMON_PREFERENCES_KEY = buildStorageKey(
);
const initial: Type = {
- showDebugInfo: true,
+ showDebugInfo: false,
toggleShowDebugInfo() {},
};