Skip to content

Commit 00e2705

Browse files
committed
fix initial height check.
copied from: josephschmitt/Clamp.js#44
1 parent 5188719 commit 00e2705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/clamp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ export function clamp(element: Element | HTMLElement, options?: IClampOptions):
348348
}
349349
} else {
350350
const height = getMaxHeight(element, clampValue as number);
351-
if (height <= getElemHeight(element)) {
351+
if (height < getElemHeight(element)) {
352352
clamped = truncate(
353353
getLastChild(element, options),
354354
element,

0 commit comments

Comments
 (0)