From f8a1a9e73f93dbfb5d3cb3811f2b4fe4c272a3bb Mon Sep 17 00:00:00 2001
From: Alexis <35.alexis.pele@gmail.com>
Date: Sun, 28 Jun 2020 23:13:47 +0200
Subject: [PATCH] - Fixed scroll trigger and error message
---
client/src/components/spells/spells-list.vue | 5 +++--
repositories/school-repository.js | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/client/src/components/spells/spells-list.vue b/client/src/components/spells/spells-list.vue
index fc95577..d177a1b 100644
--- a/client/src/components/spells/spells-list.vue
+++ b/client/src/components/spells/spells-list.vue
@@ -39,7 +39,7 @@
{
- if ((window.innerHeight + window.scrollY) >= document.body.offsetHeight) {
+ if (((window.innerHeight + window.scrollY) - document.body.offsetHeight) >= -1) {
Spells.getPage(this.currentIndex)
.then(v => {
this.loading = true
@@ -160,6 +160,7 @@ export default {
cancelAdd() {
this.adding_spell = false
},
+ // Receives events to update the data
addSpell(e) {
Spells.getOne(e.id)
.then(v => {
diff --git a/repositories/school-repository.js b/repositories/school-repository.js
index f9eae87..0aef22b 100644
--- a/repositories/school-repository.js
+++ b/repositories/school-repository.js
@@ -60,7 +60,7 @@ class SchoolRepository {
})
.catch(err => {
console.log(err)
- reject(new HttpError(500, "Couldn't get school"))
+ reject(new HttpError(500, "Couldn't get spells from school"))
})
})
}