Skip to content

Commit

Permalink
Fix breaking change from chromium
Browse files Browse the repository at this point in the history
  • Loading branch information
deltakosh committed May 20, 2024
1 parent 8b06ebc commit 5012426
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/dev/core/src/LibDeclarations/browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ declare const PressureObserver: {
prototype: PressureObserver;
new (callback: PressureUpdateCallback, options?: PressureObserverOptions): PressureObserver;

supportedSources: ReadonlyArray<PressureSource>;
knownSources: ReadonlyArray<PressureSource>;
};
2 changes: 1 addition & 1 deletion packages/dev/core/src/Misc/pressureObserverWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class PressureObserverWrapper {
* Returns true if PressureObserver is available for use, false otherwise.
*/
public static get IsAvailable() {
return typeof PressureObserver !== "undefined" && PressureObserver.supportedSources.includes("cpu");
return typeof PressureObserver !== "undefined" && PressureObserver.knownSources.includes("cpu");
}

/**
Expand Down

0 comments on commit 5012426

Please sign in to comment.