Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

common: fix off by one error when checking limits

Abdullah Atta871824f85786
diff --git a/packages/common/src/utils/is-feature-available.ts b/packages/common/src/utils/is-feature-available.ts
index ab465c5d3..9c9dd39fa 100644
--- a/packages/common/src/utils/is-feature-available.ts
+++ b/packages/common/src/utils/is-feature-available.ts
@@ -104,7 +104,7 @@ function createLimit<
: inferredValue === true
? alwaysTrue
: typeof inferredValue === "number"
- ? lte(inferredValue)
+ ? lt(inferredValue)
: alwaysFalse,
value: inferredValue
};
@@ -600,13 +600,6 @@ const AVAILABILITY_TO_PLAN: Record<
legacyPro: undefined
};
-function lte(limit: number) {
- return async (value?: number) => {
- if (typeof value === "undefined") return false;
- return value <= limit;
- };
-}
-
function lt(limit: number) {
return async (value?: number) => {
if (typeof value === "undefined") return false;