@elliemae/pui-app-sdk 5.27.0 → 5.27.1

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.
@@ -258,7 +258,7 @@ class CMicroAppGuest {
258
258
  return this.#uuid;
259
259
  }
260
260
  async init(options) {
261
- const { history, ...rest } = options;
261
+ const { history, ...rest } = options ?? {};
262
262
  this.props = import_lodash.default.merge(this.props, rest);
263
263
  if (!this.props.host) {
264
264
  const host = await this.findHost();
@@ -273,8 +273,8 @@ class CMicroAppGuest {
273
273
  (0, import_web_analytics.updateBAEventParameters)({ appId: this.appId, instanceId, userId });
274
274
  (0, import_appdynamics.setAppDynamicsUserData)({ appId: this.appId, instanceId, userId });
275
275
  const useParentHistory = (0, import_config.getAppConfigValue)("useParentHistory", true);
276
- if (useParentHistory && options?.history) {
277
- this.props.history = options.history;
276
+ if (useParentHistory && history) {
277
+ this.props.history = history;
278
278
  }
279
279
  if (!useParentHistory && options?.initialRoute) {
280
280
  this.props.history.push(options.initialRoute);
@@ -225,7 +225,7 @@ class CMicroAppGuest {
225
225
  return this.#uuid;
226
226
  }
227
227
  async init(options) {
228
- const { history, ...rest } = options;
228
+ const { history, ...rest } = options ?? {};
229
229
  this.props = _.merge(this.props, rest);
230
230
  if (!this.props.host) {
231
231
  const host = await this.findHost();
@@ -240,8 +240,8 @@ class CMicroAppGuest {
240
240
  updateBAEventParameters({ appId: this.appId, instanceId, userId });
241
241
  setAppDynamicsUserData({ appId: this.appId, instanceId, userId });
242
242
  const useParentHistory = getAppConfigValue("useParentHistory", true);
243
- if (useParentHistory && options?.history) {
244
- this.props.history = options.history;
243
+ if (useParentHistory && history) {
244
+ this.props.history = history;
245
245
  }
246
246
  if (!useParentHistory && options?.initialRoute) {
247
247
  this.props.history.push(options.initialRoute);