mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-06 18:48:50 +01:00
📜 refactor: Optimize Longer Message Thread Performance (#3610)
This commit is contained in:
parent
cf69b7ef85
commit
02847af580
8 changed files with 59 additions and 280 deletions
|
|
@ -1,4 +1,4 @@
|
|||
export default function validateIframe(content: string): string | boolean | null {
|
||||
export default function validateIframe(content: string): boolean {
|
||||
const hasValidIframe =
|
||||
content.includes('<iframe role="presentation" style="') &&
|
||||
content.includes('src="https://www.bing.com/images/create');
|
||||
|
|
@ -38,5 +38,7 @@ export default function validateIframe(content: string): string | boolean | null
|
|||
const role = iframe.getAttribute('role');
|
||||
const src = iframe.getAttribute('src');
|
||||
|
||||
return role === 'presentation' && src && src.startsWith('https://www.bing.com/images/create');
|
||||
return (
|
||||
role === 'presentation' && src != null && src.startsWith('https://www.bing.com/images/create')
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue