We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcc5097 commit a76338dCopy full SHA for a76338d
adminforth/modules/utils.ts
@@ -159,16 +159,14 @@ const csscolors = {
159
}
160
161
162
-export async function getLoginPromptHTML(prompt) {
163
- if(typeof prompt === 'function') {
164
- const result = await prompt();
165
- if(result !== undefined){
166
- return result;
+export async function getLoginPromptHTML(loginPrompt: string | Function) {
+ if(typeof loginPrompt === 'function') {
+ loginPrompt = await loginPrompt();
+ if (!loginPrompt) {
+ return null;
167
168
- return "";
169
- } else {
170
- return prompt;
171
+ return loginPrompt;
172
173
174
export function guessLabelFromName(name) {
0 commit comments