Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/PortalWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function getOpenCount() {

// https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
let cacheOverflow = {};
let cacheOverflow: React.CSSProperties = {};

const getParent = (getContainer: GetContainer) => {
if (!supportDom) {
Expand Down
5 changes: 3 additions & 2 deletions src/getScrollBarSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ ${heightStyle}

// Measure. Get fallback style if provided
const scrollWidth =
ele && fallbackWidth && !isNaN(fallbackWidth)
ele && fallbackWidth && !Number.isNaN(fallbackWidth)
? fallbackWidth
: measureEle.offsetWidth - measureEle.clientWidth;

const scrollHeight =
ele && fallbackHeight && !isNaN(fallbackHeight)
ele && fallbackHeight && !Number.isNaN(fallbackHeight)
? fallbackHeight
: measureEle.offsetHeight - measureEle.clientHeight;

Expand Down
5 changes: 3 additions & 2 deletions src/isMobile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import isMobile from 'is-mobile';

let cached: boolean;

export default () => {
const getIsMobile = () => {
if (typeof cached === 'undefined') {
cached = isMobile();
}

return cached;
};

export default getIsMobile;
Loading