@ndlib/component-library 1.0.10 → 1.0.11
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.
|
@@ -124,7 +124,7 @@ export const AlertsProvider = ({ domain = ALERT_DOMAIN.LIBRARY, endpoint, startT
|
|
|
124
124
|
};
|
|
125
125
|
export const useAlerts = (pageAlerts) => {
|
|
126
126
|
const { alerts: allAlerts, dismiss } = React.useContext(AlertsContext);
|
|
127
|
-
const alerts = pageAlerts
|
|
127
|
+
const alerts = pageAlerts && (pageAlerts === null || pageAlerts === void 0 ? void 0 : pageAlerts.length) > 0
|
|
128
128
|
? allAlerts.filter((alert) => alert.global || pageAlerts.includes(alert.uuid))
|
|
129
129
|
: allAlerts.filter((alert) => alert.global);
|
|
130
130
|
return {
|
package/package.json
CHANGED