adminforth 1.2.91 → 1.2.93
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/modules/restApi.js +1 -2
- package/modules/restApi.ts +1 -2
- package/package.json +1 -1
package/dist/modules/restApi.js
CHANGED
|
@@ -160,8 +160,7 @@ export default class AdminForthRestAPI {
|
|
|
160
160
|
function processMenuItem(menuItem) {
|
|
161
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
162
|
if (menuItem.badge) {
|
|
163
|
-
|
|
164
|
-
if (menuItem.badge && menuItem.badge.then || typeof menuItem.badge === 'function') {
|
|
163
|
+
if (typeof menuItem.badge !== 'string') {
|
|
165
164
|
menuItem.badge = yield menuItem.badge(adminUser);
|
|
166
165
|
}
|
|
167
166
|
}
|
package/modules/restApi.ts
CHANGED
|
@@ -189,8 +189,7 @@ export default class AdminForthRestAPI {
|
|
|
189
189
|
|
|
190
190
|
async function processMenuItem(menuItem) {
|
|
191
191
|
if (menuItem.badge) {
|
|
192
|
-
|
|
193
|
-
if (menuItem.badge && menuItem.badge.then || typeof menuItem.badge === 'function') {
|
|
192
|
+
if (typeof menuItem.badge !== 'string') {
|
|
194
193
|
menuItem.badge = await menuItem.badge(adminUser);
|
|
195
194
|
}
|
|
196
195
|
}
|