We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38ad1e1 commit a312a70Copy full SHA for a312a70
src/lib/common/MessageImageGallery.svelte
@@ -21,15 +21,17 @@
21
onMount(() => {
22
const user = getUserStore();
23
token = user.token;
24
- fetchFiles().then(data => {
25
- // @ts-ignore
26
- files = data?.filter(item => !!item.file_url)?.map(item => {
27
- return {
28
- ...item,
29
- file_data: `${PUBLIC_SERVICE_URL}${item.file_url}?access_token=${token}`
30
- };
31
- }) || [];
32
- });
+ if (fetchFiles != null && fetchFiles != undefined) {
+ fetchFiles().then(data => {
+ // @ts-ignore
+ files = data?.filter(item => !!item.file_url)?.map(item => {
+ return {
+ ...item,
+ file_data: `${PUBLIC_SERVICE_URL}${item.file_url}?access_token=${token}`
+ };
+ }) || [];
33
+ });
34
+ }
35
});
36
</script>
37
0 commit comments