Skip to content

Commit

Permalink
Env binding.
Browse files Browse the repository at this point in the history
  • Loading branch information
bia-pain-bache committed Apr 22, 2024
1 parent 0ab787c commit d29c779
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default {

case '/panel':

if (!env.bpb?.hasOwnProperty('get')) {
if (typeof env.bpb !== 'object') {
const errorPage = renderErrorPage('KV Dataset is not properly set!', null, true);
return new Response(errorPage, { status: 200, headers: {'Content-Type': 'text/html'}});
}
Expand Down Expand Up @@ -109,7 +109,7 @@ export default {

case '/login':

if (!env.bpb?.hasOwnProperty('get')) {
if (typeof env.bpb !== 'object') {
const errorPage = renderErrorPage('KV Dataset is not properly set!', null, true);
return new Response(errorPage, { status: 200, headers: {'Content-Type': 'text/html'}});
}
Expand Down

0 comments on commit d29c779

Please sign in to comment.