mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-04 22:01:42 +08:00
fix: cf ui var is string (#178)
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
import { createMimeMessage } from "mimetext";
|
||||
|
||||
export const getBooleanValue = (value) => {
|
||||
if (typeof value === "boolean") {
|
||||
return value;
|
||||
}
|
||||
if (typeof value === "string") {
|
||||
return value === "true";
|
||||
}
|
||||
console.error("Invalid boolean value", value);
|
||||
return false;
|
||||
}
|
||||
|
||||
export const getDomains = (c) => {
|
||||
if (!c.env.DOMAINS) {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user