Skip to content

Commit 0964fb6

Browse files
committed
more mistakes
1 parent a1b0cc2 commit 0964fb6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Scrollbar/index.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export default class Scrollbar extends Component
168168
get scrollLeft() {
169169
if (!this.content) { return 0; }
170170

171-
this.content.scrollLeft = left;
171+
return this.content.scrollLeft;
172172
}
173173

174174
/**
@@ -184,9 +184,7 @@ export default class Scrollbar extends Component
184184
* @return {number}
185185
*/
186186
get scrollWidth() {
187-
if (!this.content) {
188-
return 0;
189-
}
187+
if (!this.content) { return 0; }
190188
return this.content.scrollWidth;
191189
}
192190

@@ -214,9 +212,7 @@ export default class Scrollbar extends Component
214212
* @return {Scrollbar}
215213
*/
216214
scrollToTop() {
217-
if (!this.content) {
218-
return this;
219-
}
215+
if (!this.content) { return this; }
220216
this.content.scrollTop = 0;
221217

222218
return this;

0 commit comments

Comments
 (0)