summaryrefslogtreecommitdiff
path: root/src/web/app/desktop
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-20 09:19:53 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-20 09:19:53 +0900
commitd259740f057a531be4023d0ccdc2cdb41b0f3c30 (patch)
tree46da279c4ea05f3b7d1cf02805e4c519073203f6 /src/web/app/desktop
parentClean up (diff)
downloadmisskey-d259740f057a531be4023d0ccdc2cdb41b0f3c30.tar.gz
misskey-d259740f057a531be4023d0ccdc2cdb41b0f3c30.tar.bz2
misskey-d259740f057a531be4023d0ccdc2cdb41b0f3c30.zip
Fix bug
Diffstat (limited to 'src/web/app/desktop')
-rw-r--r--src/web/app/desktop/tags/home.tag15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/web/app/desktop/tags/home.tag b/src/web/app/desktop/tags/home.tag
index 95e68cbcbb..fb244941a7 100644
--- a/src/web/app/desktop/tags/home.tag
+++ b/src/web/app/desktop/tags/home.tag
@@ -206,6 +206,13 @@
}
});
+ if (this.refs.left.children.length == 0) {
+ this.refs.left.parentNode.removeChild(this.refs.left);
+ }
+ if (this.refs.right.children.length == 0) {
+ this.refs.right.parentNode.removeChild(this.refs.right);
+ }
+
if (this.opts.customize) {
dialog('<i class="fa fa-info-circle"></i>カスタマイズのヒント',
'<p>ホームのカスタマイズでは、ウィジェットを追加/削除したり、ドラッグ&ドロップして並べ替えたりすることができます。</p>' +
@@ -243,8 +250,8 @@
}
if (!this.opts.customize) {
- this.scrollFollowerLeft = new ScrollFollower(this.refs.left, this.root.getBoundingClientRect().top);
- this.scrollFollowerRight = new ScrollFollower(this.refs.right, this.root.getBoundingClientRect().top);
+ this.scrollFollowerLeft = this.refs.left.parentNode ? new ScrollFollower(this.refs.left, this.root.getBoundingClientRect().top) : null;
+ this.scrollFollowerRight = this.refs.right.parentNode ? new ScrollFollower(this.refs.right, this.root.getBoundingClientRect().top) : null;
}
});
@@ -254,8 +261,8 @@
});
if (!this.opts.customize) {
- this.scrollFollowerLeft.dispose();
- this.scrollFollowerRight.dispose();
+ if (this.scrollFollowerLeft) this.scrollFollowerLeft.dispose();
+ if (this.scrollFollowerRight) this.scrollFollowerRight.dispose();
}
});