Skip to content

Commit

Permalink
fix: add debug info to EmptyResizeObserver
Browse files Browse the repository at this point in the history
  • Loading branch information
Maizify committed May 24, 2023
1 parent 0d5d149 commit 5229e8e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/component/recycleScroller/resizeObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
*/
class EmptyResizeObserver {
constructor(callback: (entries: any[], observer?: EmptyResizeObserver) => void) {
// do nothing
console.debug('[vConsole] `ResizeObserver` is not supported in the browser, vConsole cannot render correctly.');
const entries = [{
contentRect: { height: 60 },
}];
callback(entries, this);
}

public disconnect() {
Expand All @@ -20,4 +24,5 @@ class EmptyResizeObserver {
}
}

// export const ResizeObserverPolyfill = EmptyResizeObserver;
export const ResizeObserverPolyfill = window.ResizeObserver || EmptyResizeObserver;

This comment has been minimized.

Copy link
@Bonniefye

Bonniefye Apr 4, 2024

Screenshot_20240217_183009_Drive
Screenshot_20240217_183009_Drive

This comment has been minimized.

Copy link
@Bonniefye

Bonniefye Apr 4, 2024

I have been hacked and need access to open this file which I found in my phone.

0 comments on commit 5229e8e

Please sign in to comment.