Skip to content

Commit 9fa4951

Browse files
committed
Fix merge conflicts
2 parents 8086b38 + c65d8a9 commit 9fa4951

5 files changed

Lines changed: 12 additions & 7 deletions

File tree

dist/web.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/web.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/window.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "flowise-embed",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "Javascript library to display flowise chatbot on your website",
55
"type": "module",
66
"main": "dist/index.js",

src/window.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ let elementUsed: Element | undefined;
1515

1616
export const initFull = (props: BotProps & { id?: string }) => {
1717
destroy();
18-
const fullElement = props.id ? document.getElementById(props.id) : document.querySelector('flowise-fullchatbot');
19-
if (!fullElement) throw new Error('<flowise-fullchatbot> element not found.');
20-
Object.assign(fullElement, props);
18+
let fullElement = props.id ? document.getElementById(props.id) : document.querySelector('flowise-fullchatbot');
19+
if (!fullElement) {
20+
fullElement = document.createElement('flowise-fullchatbot');
21+
Object.assign(fullElement, props);
22+
document.body.appendChild(fullElement);
23+
} else {
24+
Object.assign(fullElement, props);
25+
}
2126
elementUsed = fullElement;
2227
};
2328

0 commit comments

Comments
 (0)