mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +08:00
fix: add prefer-dom-node-dataset rule (#5107)
This commit is contained in:
@@ -48,6 +48,8 @@ export const getPagesCount = async (page: Page) => {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// locator is not a HTMLElement, so we can't use dataset
|
||||
// eslint-disable-next-line unicorn/prefer-dom-node-dataset
|
||||
const count = await locator.getAttribute('data-total-count');
|
||||
return count ? parseInt(count) : 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user