Skip to content

Commit

Permalink
v1.0.11: Added a more universal approach but it's not optimized.
Browse files Browse the repository at this point in the history
v1.0.10 fix only addressed nuxt ssr.
  • Loading branch information
fuxingloh committed Jul 3, 2020
1 parent d61bf6b commit 61a0d0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-horizontal-list",
"version": "1.0.10",
"version": "1.0.11",
"description": "A pure vue ssr friendly horizontal list implementation.",
"author": "Fuxing Loh",
"repository": {
Expand Down
7 changes: 3 additions & 4 deletions src/vue-horizontal-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
</template>

<script>
if (!process.server || process.client) {
require('smoothscroll-polyfill').polyfill();
}
export default {
name: "VueHorizontalList",
props: {
Expand Down Expand Up @@ -94,6 +90,9 @@
this.width.container = this.$refs.container.clientWidth
}
// Added a simple SSR fix, need to look into it for optimization in the future
require('smoothscroll-polyfill').polyfill();
this.$resize()
window.addEventListener('resize', this.$resize)
},
Expand Down

0 comments on commit 61a0d0f

Please sign in to comment.