Skip to content

Commit e6fa971

Browse files
authored
fix: refactor missing default value (#346)
* fix: refactor missing default value * chore: prettier
1 parent e589b7f commit e6fa971

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/hooks/useAlign.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export default function useAlign(
316316
popupPoints[0] === 't' &&
317317
nextPopupBottom > visibleArea.bottom
318318
) {
319-
let tmpNextOffsetY: number;
319+
let tmpNextOffsetY: number = nextOffsetY;
320320

321321
if (sameTB) {
322322
tmpNextOffsetY -= popupHeight - targetHeight;
@@ -344,7 +344,7 @@ export default function useAlign(
344344
popupPoints[0] === 'b' &&
345345
nextPopupY < visibleArea.top
346346
) {
347-
let tmpNextOffsetY: number;
347+
let tmpNextOffsetY: number = nextOffsetY;
348348

349349
if (sameTB) {
350350
tmpNextOffsetY += popupHeight - targetHeight;
@@ -381,7 +381,7 @@ export default function useAlign(
381381
popupPoints[1] === 'l' &&
382382
nextPopupRight > visibleArea.right
383383
) {
384-
let tmpNextOffsetX: number;
384+
let tmpNextOffsetX: number = nextOffsetX;
385385

386386
if (sameLR) {
387387
tmpNextOffsetX -= popupWidth - targetWidth;
@@ -409,7 +409,7 @@ export default function useAlign(
409409
popupPoints[1] === 'r' &&
410410
nextPopupX < visibleArea.left
411411
) {
412-
let tmpNextOffsetX: number;
412+
let tmpNextOffsetX: number = nextOffsetX;
413413

414414
if (sameLR) {
415415
tmpNextOffsetX += popupWidth - targetWidth;

0 commit comments

Comments
 (0)