@salesforcedevs/docs-components 1.21.1-redocly3 → 1.21.1-redocly4
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.
package/package.json
CHANGED
|
@@ -75,6 +75,7 @@ export default class RedocReference extends LightningElement {
|
|
|
75
75
|
|
|
76
76
|
renderedCallback(): void {
|
|
77
77
|
if (!this.redocInitialized) {
|
|
78
|
+
this.redocInitialized = true;
|
|
78
79
|
this.initializeRedoc();
|
|
79
80
|
}
|
|
80
81
|
}
|
|
@@ -83,6 +84,8 @@ export default class RedocReference extends LightningElement {
|
|
|
83
84
|
window.removeEventListener("scroll", this.handleScrollAndResize);
|
|
84
85
|
window.removeEventListener("resize", this.handleScrollAndResize);
|
|
85
86
|
|
|
87
|
+
this.handleScrollAndResize?.cancel?.();
|
|
88
|
+
|
|
86
89
|
// Clean up cached DOM element references to prevent memory leaks
|
|
87
90
|
this.docHeaderElement = null;
|
|
88
91
|
this.docPhaseWrapperElement = null;
|
|
@@ -215,7 +218,6 @@ export default class RedocReference extends LightningElement {
|
|
|
215
218
|
// Initializes Redoc library with selected reference configuration
|
|
216
219
|
private async initializeRedoc(): Promise<void> {
|
|
217
220
|
try {
|
|
218
|
-
this.redocInitialized = true;
|
|
219
221
|
await this.waitForRedoc();
|
|
220
222
|
|
|
221
223
|
const redocContainer = this.getRedocContainer();
|
|
@@ -230,9 +232,7 @@ export default class RedocReference extends LightningElement {
|
|
|
230
232
|
|
|
231
233
|
const specUrl = selectedRef.source;
|
|
232
234
|
if (!specUrl) {
|
|
233
|
-
this.showErrorUI(
|
|
234
|
-
"Spec URL or Redoc container is not found."
|
|
235
|
-
);
|
|
235
|
+
this.showErrorUI("Spec URL not found.");
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
238
|
|