@bindu-dashing/dam-solution-v2 5.9.227 → 5.9.229

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.
@@ -26,11 +26,13 @@ import dayjs from "dayjs";
26
26
  import { DATE_FORMAT, DATE_WITH_TIME_FORMAT } from "../hocs/appConstants";
27
27
  import { showNotification } from "../common/notifications";
28
28
  import { UPDATE_SUCCESS } from "../utilities/constants/messages";
29
+ const EMPTY_ARRAY = [];
29
30
  export default function AddFieldProperties({ field, setCurrentFieldIndex, onUpdateField, currentInputType, index, allFields, onCancel, }) {
30
31
  const { styles, brand, teams } = useDamConfig();
31
32
  const queryClient = useQueryClient();
32
33
  const brandId = get(brand, "_id");
33
- const brandUsers = getCurrentBrandUsers(queryClient, brandId);
34
+ const rawBrandUsers = getCurrentBrandUsers(queryClient, brandId);
35
+ const brandUsers = Array.isArray(rawBrandUsers) && rawBrandUsers.length > 0 ? rawBrandUsers : EMPTY_ARRAY;
34
36
  const userOptions = useMemo(() => map(brandUsers, (user) => getUserAvatar(user)), [brandUsers, brandId]);
35
37
  const teamOptions = useMemo(() => {
36
38
  const externalTeams = (teams || []).filter((team) => get(team, "id") != null || get(team, "_id") != null);
@@ -7,6 +7,7 @@ import { ThemeModes } from "../utilities/constants/interface";
7
7
  import AppRoutes from "./routes";
8
8
  import ToastProvider from "../hocs/ToastProvider";
9
9
  import { ParamsProvider } from "../utilities/useAppParams";
10
+ import AppProvider from "../hocs/AppProvider";
10
11
  import process from "process";
11
12
  function App(props) {
12
13
  const config = {
@@ -20,6 +21,6 @@ function App(props) {
20
21
  if (typeof window !== "undefined" && !window.process) {
21
22
  window.process = process;
22
23
  }
23
- return (_jsx(DamConfigProvider, { config: config, children: _jsxs(ThemeProvider, { styles: props === null || props === void 0 ? void 0 : props.styles, sessionTheme: ThemeModes.LIGHT, children: [_jsx(MemoryRouter, { initialEntries: ["/"], children: _jsx(ParamsProvider, { children: _jsx(AppRoutes, { routerVersion: (props === null || props === void 0 ? void 0 : props.routerVersion) || 6 }) }) }), _jsx(ToastProvider, {})] }) }));
24
+ return (_jsx(DamConfigProvider, { config: config, children: _jsx(AppProvider, { children: _jsxs(ThemeProvider, { styles: props === null || props === void 0 ? void 0 : props.styles, sessionTheme: ThemeModes.LIGHT, children: [_jsx(MemoryRouter, { initialEntries: ["/"], children: _jsx(ParamsProvider, { children: _jsx(AppRoutes, { routerVersion: (props === null || props === void 0 ? void 0 : props.routerVersion) || 6 }) }) }), _jsx(ToastProvider, {})] }) }) }));
24
25
  }
25
26
  export default App;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.9.227",
3
+ "version": "5.9.229",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",