mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
Update literals.ts
This commit is contained in:
1 parent
0552ac790e
commit
1d319551e7
1 file changed
+1
-3
@@ -1,7 +1,5 @@
|
||||
import { assertSecret } from "@blitzkit/core";
|
||||
|
||||
const dev = assertSecret(import.meta.env.DEV);
|
||||
|
||||
export function literals(
|
||||
string: string,
|
||||
literals?: Record<string, string | number | undefined>
|
||||
@@ -9,7 +7,7 @@ export function literals(
|
||||
for (const key in literals) {
|
||||
const mutated = string.replaceAll(`{${key}}`, `${literals[key]}`);
|
||||
|
||||
if (dev && mutated === string) {
|
||||
if (import.meta.env.DEV && mutated === string) {
|
||||
console.warn(`Could not find literal {${key}} in string "${string}"`);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user