From b7e39b59fd0fc7b5610ebff29035bf622079e0d8 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Wed, 5 Oct 2022 20:45:21 +0800 Subject: refactor: Change file structure --- code/app/src/actions/pwKey.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 code/app/src/actions/pwKey.js (limited to 'code/app/src/actions/pwKey.js') diff --git a/code/app/src/actions/pwKey.js b/code/app/src/actions/pwKey.js new file mode 100644 index 0000000..2c019f3 --- /dev/null +++ b/code/app/src/actions/pwKey.js @@ -0,0 +1,12 @@ +import { is_development, is_testing } from "$lib/configuration"; +export default function pwKey(node, value) { + 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); +} +//# sourceMappingURL=pwKey.js.map \ No newline at end of file -- cgit v1.3