mirror of
https://github.com/imputnet/cobalt.git
synced 2025-06-28 09:28:29 +00:00
web/safety-warning: early returns
This commit is contained in:
parent
002e70cb89
commit
b4599e68bb
@ -7,7 +7,10 @@ import settings, { updateSetting } from "$lib/state/settings";
|
||||
import { createDialog } from "$lib/dialogs";
|
||||
|
||||
export const apiOverrideWarning = async () => {
|
||||
if (env.DEFAULT_API && !get(settings).processing.seenOverrideWarning) {
|
||||
if (!env.DEFAULT_API || get(settings).processing.seenOverrideWarning) {
|
||||
return;
|
||||
}
|
||||
|
||||
let _actions: {
|
||||
resolve: () => void;
|
||||
reject: () => void;
|
||||
@ -59,10 +62,12 @@ export const apiOverrideWarning = async () => {
|
||||
|
||||
await promise;
|
||||
}
|
||||
}
|
||||
|
||||
export const customInstanceWarning = async () => {
|
||||
if (!get(settings).processing.seenCustomWarning) {
|
||||
if (get(settings).processing.seenCustomWarning) {
|
||||
return;
|
||||
}
|
||||
|
||||
let _actions: {
|
||||
resolve: () => void;
|
||||
reject: () => void;
|
||||
@ -108,4 +113,3 @@ export const customInstanceWarning = async () => {
|
||||
|
||||
await promise;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user