aboutsummaryrefslogtreecommitdiffstats
path: root/code/app/src/actions/pwKey.ts
blob: 351a4b8a975b22179d13e44b059de771f13ac169 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import {is_development, is_testing} from "$configuration";

export default function pwKey(node: HTMLElement, value: string | undefined) {
    if (!value) return;
    if (!is_testing()) {
        if (is_development()) console.warn("VITE_TESTING is false, so not setting pw-key attributes");
        return;
    }
    node.setAttribute("pw-key", value);
}