adminforth 1.1.80 → 1.1.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -612,7 +612,7 @@ class AdminForth {
|
|
|
612
612
|
username
|
|
613
613
|
};
|
|
614
614
|
const beforeLoginConfirmation = this.config.auth.beforeLoginConfirmation;
|
|
615
|
-
if (beforeLoginConfirmation.length) {
|
|
615
|
+
if (beforeLoginConfirmation === null || beforeLoginConfirmation === void 0 ? void 0 : beforeLoginConfirmation.length) {
|
|
616
616
|
for (const hook of beforeLoginConfirmation) {
|
|
617
617
|
const resp = yield hook({ userRecord: adminUser });
|
|
618
618
|
if ((_d = resp === null || resp === void 0 ? void 0 : resp.body) === null || _d === void 0 ? void 0 : _d.setCookie) {
|
package/index.ts
CHANGED
|
@@ -707,7 +707,7 @@ class AdminForth implements AdminForthClass {
|
|
|
707
707
|
username
|
|
708
708
|
};
|
|
709
709
|
const beforeLoginConfirmation = this.config.auth.beforeLoginConfirmation as BeforeLoginConfirmationFunction[];
|
|
710
|
-
if (beforeLoginConfirmation
|
|
710
|
+
if (beforeLoginConfirmation?.length){
|
|
711
711
|
for (const hook of beforeLoginConfirmation) {
|
|
712
712
|
const resp = await hook({ userRecord:adminUser});
|
|
713
713
|
if (resp?.body?.setCookie){
|