Browse Source

fix warnings

Henry Jameson 2 years ago
parent
commit
4b630c3c36

+ 2 - 2
src/components/status/status.js

@@ -69,7 +69,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
   const controlledName = `controlled${camelized}`
   const controlledName = `controlled${camelized}`
   const uncontrolledName = `uncontrolled${camelized}`
   const uncontrolledName = `uncontrolled${camelized}`
   res[name] = function () {
   res[name] = function () {
-    return this[toggle] ? this[controlledName] : this[uncontrolledName]
+    return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName]
   }
   }
   return res
   return res
 }, {})
 }, {})
@@ -311,7 +311,7 @@ const Status = {
       return this.mergedConfig.hideWordFilteredPosts
       return this.mergedConfig.hideWordFilteredPosts
     },
     },
     hideStatus () {
     hideStatus () {
-      return (this.virtualHidden || !this.shouldNotMute) && (
+      return (!this.shouldNotMute) && (
         (this.muted && this.hideFilteredStatuses) ||
         (this.muted && this.hideFilteredStatuses) ||
         (this.userIsMuted && this.hideMutedUsers) ||
         (this.userIsMuted && this.hideMutedUsers) ||
         (this.status.thread_muted && this.hideMutedThreads) ||
         (this.status.thread_muted && this.hideMutedThreads) ||

+ 1 - 1
src/components/status_content/status_content.js

@@ -31,7 +31,7 @@ const controlledOrUncontrolledGetters = list => list.reduce((res, name) => {
   const controlledName = `controlled${camelized}`
   const controlledName = `controlled${camelized}`
   const uncontrolledName = `uncontrolled${camelized}`
   const uncontrolledName = `uncontrolled${camelized}`
   res[name] = function () {
   res[name] = function () {
-    return this[toggle] ? this[controlledName] : this[uncontrolledName]
+    return (Object.getOwnPropertyDescriptor(this, toggle) && this[toggle]) ? this[controlledName] : this[uncontrolledName]
   }
   }
   return res
   return res
 }, {})
 }, {})