mirror of https://github.com/FreeTubeApp/FreeTube
Bind directive to function instead of function call (#3091)
v-if="showResult(data)" evaluates once v-if="showResult" is reactive; `data` also doesn't need to be passed here because it is already accessible from `this`.
This commit is contained in:
parent
0f4bf0e87e
commit
12e9565dbe
|
@ -54,7 +54,8 @@ export default defineComponent({
|
|||
*
|
||||
* @return {bool} false to hide the video, true to show it
|
||||
*/
|
||||
showResult: function (data) {
|
||||
showResult: function () {
|
||||
const { data } = this
|
||||
if (!data.type) {
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div
|
||||
v-if="showResult(data)"
|
||||
v-if="showResult"
|
||||
v-observe-visibility="firstScreen ? false : {
|
||||
callback: onVisibilityChanged,
|
||||
once: true,
|
||||
|
|
Loading…
Reference in New Issue