@dative-gpi/foundation-shared-components 0.0.145 → 0.0.147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,25 +108,29 @@ export default defineComponent({
108
108
  const goToStart = () => {
109
109
  if (slideGroupRef.value) {
110
110
  const scrollElement = (slideGroupRef.value as any).$el.children[1];
111
- scrollElement.scrollTo({ left: -scrollElement.scrollLeft, behavior: "smooth" });
111
+ if (scrollElement && scrollElement.scrollTo) {
112
+ scrollElement.scrollTo({ left: -scrollElement.scrollLeft, behavior: "smooth" });
113
+ }
112
114
  }
113
115
  };
114
116
 
115
117
  const goToEnd = () => {
116
118
  if (slideGroupRef.value) {
117
119
  const scrollElement = (slideGroupRef.value as any).$el.children[1];
118
- scrollElement.scrollTo({ left: scrollElement.scrollWidth - scrollElement.scrollLeft, behavior: "smooth" });
120
+ if (scrollElement && scrollElement.scrollTo) {
121
+ scrollElement.scrollTo({ left: scrollElement.scrollWidth - scrollElement.scrollLeft, behavior: "smooth" });
122
+ }
119
123
  }
120
124
  };
121
125
 
122
126
  const goToPrev = () => {
123
- if (slideGroupRef.value) {
127
+ if (slideGroupRef.value && (slideGroupRef.value as any).scrollTo) {
124
128
  (slideGroupRef.value as any).scrollTo("prev");
125
129
  }
126
130
  };
127
131
 
128
132
  const goToNext = () => {
129
- if (slideGroupRef.value) {
133
+ if (slideGroupRef.value && (slideGroupRef.value as any).scrollTo) {
130
134
  (slideGroupRef.value as any).scrollTo("next");
131
135
  forceActive.value = false;
132
136
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.145",
4
+ "version": "0.0.147",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "0.0.145",
14
- "@dative-gpi/foundation-shared-services": "0.0.145",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.147",
14
+ "@dative-gpi/foundation-shared-services": "0.0.147",
15
15
  "@fontsource/montserrat": "^5.0.16",
16
16
  "@lexical/clipboard": "^0.12.5",
17
17
  "@lexical/history": "^0.12.5",
@@ -32,5 +32,5 @@
32
32
  "sass": "^1.69.5",
33
33
  "sass-loader": "^13.3.2"
34
34
  },
35
- "gitHead": "3d11321eaa64d0fa150cab22ff5256f28e4cf93e"
35
+ "gitHead": "934e88a527b32b21e1efb86f5328fdc938a36410"
36
36
  }