Fix legacy createApp factory to not override targetDomain
This commit is contained in:
parent
6de0675784
commit
915f6496f1
2 changed files with 8 additions and 1 deletions
|
@ -95,6 +95,12 @@ export class AppBridge {
|
|||
console.warn("document.referrer is empty");
|
||||
}
|
||||
|
||||
if (!this.combinedOptions.targetDomain) {
|
||||
console.error(
|
||||
"No domain set, ensure ?domain param in iframe exist or provide in AppBridge constructor"
|
||||
);
|
||||
}
|
||||
|
||||
this.setInitialState();
|
||||
this.listenOnMessages();
|
||||
}
|
||||
|
|
|
@ -9,5 +9,6 @@ export * from "./types";
|
|||
/**
|
||||
* @deprecated use new AppBridge(), createApp will be removed
|
||||
*/
|
||||
export const createApp = (targetDomain?: string) => new AppBridge({ targetDomain });
|
||||
export const createApp = (targetDomain?: string) =>
|
||||
new AppBridge(targetDomain ? { targetDomain } : undefined);
|
||||
export default createApp;
|
||||
|
|
Loading…
Reference in a new issue