Skip to content

Commit e347e66

Browse files
committed
Remove useless logics to reduce the build file size
1 parent f34f5c6 commit e347e66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/InfiniteLoading.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
if (!this.isLoading) {
119119
clearTimeout(this.debounceTimer);
120120
121-
if (typeof ev === 'object' && ev.constructor === Event) {
121+
if (ev && ev.constructor === Event) {
122122
this.debounceTimer = setTimeout(this.attemptLoad, this.debounceDuration);
123123
} else {
124124
this.attemptLoad();
@@ -155,7 +155,7 @@
155155
setTimeout(this.scrollHandler, 1);
156156
});
157157
158-
if (typeof this.onInfinite === 'function') {
158+
if (this.onInfinite) {
159159
console.warn('[Vue-infinite-loading warn]: `:on-infinite` property will be deprecated soon, please use `@infinite` event instead.');
160160
}
161161
},

0 commit comments

Comments
 (0)