From bdd240a2308ee729680a7e9d0cf7d801dfdbe4cc Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 28 Mar 2022 17:21:42 +0300 Subject: [PATCH] fix some more warnings --- src/components/timeline/timeline.js | 4 ++-- src/directives/body_scroll_lock.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 6ede1dc5..8ec5d1e5 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -43,8 +43,8 @@ const Timeline = { filteredVisibleStatuses () { return this.timeline.visibleStatuses.filter(status => this.timelineName !== 'user' || (status.id >= this.timeline.minId && status.id <= this.timeline.maxId)) }, - filteredPinnedStatusesId () { - return this.pinnedStatusIds.filter(statusId => this.timeline.statusesObject[statusId]) + filteredPinnedStatusIds () { + return (this.pinnedStatusIds || []).filter(statusId => this.timeline.statusesObject[statusId]) }, newStatusCount () { return this.timeline.newStatusCount diff --git a/src/directives/body_scroll_lock.js b/src/directives/body_scroll_lock.js index 13a6de1c..f5cc2247 100644 --- a/src/directives/body_scroll_lock.js +++ b/src/directives/body_scroll_lock.js @@ -50,7 +50,7 @@ const enableBodyScroll = (el) => { } const directive = { - inserted: (el, binding) => { + mounted: (el, binding) => { if (binding.value) { disableBodyScroll(el) }