ba-js-common-header 0.0.72 → 0.0.73

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.
@@ -14975,18 +14975,28 @@ function MenuBar() {
14975
14975
  const {
14976
14976
  origin,
14977
14977
  pathname,
14978
- search,
14979
- hash
14978
+ search
14980
14979
  } = new URL(window.location.href);
14981
14980
  const params = queryString.parse(search);
14981
+ const hrefs = items.filter((item) => !!item.href).map((item) => new URL(item.href, origin).pathname);
14982
+ const set2 = new Set(hrefs);
14983
+ const duplicates = hrefs.filter((href) => {
14984
+ if (set2.has(href)) {
14985
+ set2.delete(href);
14986
+ return void 0;
14987
+ }
14988
+ return href;
14989
+ });
14982
14990
  const selectedItem = items.find((item) => {
14983
14991
  const {
14984
14992
  origin: itemOrigin,
14985
14993
  pathname: itemPathname,
14986
- search: itemSearch,
14987
- hash: itemHash
14994
+ search: itemSearch
14988
14995
  } = new URL(item.href, origin);
14989
- return itemOrigin === origin && itemPathname === pathname && isMatch_1(params, queryString.parse(itemSearch)) && itemHash === hash;
14996
+ if (duplicates.find((duplicate) => duplicate === itemPathname)) {
14997
+ return itemOrigin === origin && itemPathname === pathname && isMatch_1(params, queryString.parse(itemSearch));
14998
+ }
14999
+ return itemOrigin === origin && itemPathname === pathname;
14990
15000
  });
14991
15001
  if (selectedItem) {
14992
15002
  dispatch(setSelectedItem(selectedItem.id));
@@ -15072,7 +15082,7 @@ function Notifications() {
15072
15082
  sixWksAgo = getYMD(sixWksAgo);
15073
15083
  Object.keys(items).forEach((lang) => {
15074
15084
  items[lang].forEach((langNotifs) => {
15075
- langNotifs.items = langNotifs.items.filter((n2) => n2.date && getYMD(new Date(n2.date)) > sixWksAgo);
15085
+ langNotifs.items = langNotifs.items.filter((n2) => !n2.date || getYMD(new Date(n2.date)) > sixWksAgo);
15076
15086
  });
15077
15087
  items[lang] = items[lang].filter((langNotifs) => langNotifs.items.length > 0);
15078
15088
  });