aboutsummaryrefslogtreecommitdiff
path: root/static/js/timeago.ts
diff options
context:
space:
mode:
Diffstat (limited to 'static/js/timeago.ts')
-rw-r--r--static/js/timeago.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/static/js/timeago.ts b/static/js/timeago.ts
index af8f6f5..7c1973d 100644
--- a/static/js/timeago.ts
+++ b/static/js/timeago.ts
@@ -8,7 +8,8 @@
style: "long",
});
- function viewport(element, options = { offset: 250 }) {
+ function viewport(element) {
+ const options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { offset: 250 };
const view = element.getBoundingClientRect();
return view.top >= -options.offset
&& view.left >= -options.offset