Sfoglia il codice sorgente

fix some more warnings

Henry Jameson 2 anni fa
parent
commit
bdd240a230

+ 2 - 2
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

+ 1 - 1
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)
     }