Skip to content

Commit 8cc6527

Browse files
committed
fix(QFile): SSR hydration error
1 parent 75e8ae2 commit 8cc6527

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ui/src/components/file/QFile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import QChip from '../chip/QChip.js'
55

66
import FileMixin from '../../mixins/file.js'
77

8+
import { isSSR } from '../../plugins/Platform'
89
import { humanStorageSize } from '../../utils/format.js'
910
import { cache } from '../../utils/vm.js'
1011

@@ -14,7 +15,10 @@ export default Vue.extend({
1415
mixins: [ QField, FileMixin ],
1516

1617
props: {
17-
value: [ File, FileList, Array ],
18+
/* SSR does not know about File & FileList */
19+
value: isSSR === true
20+
? {}
21+
: [ File, FileList, Array ],
1822

1923
useChips: Boolean,
2024
displayValue: [ String, Number ],

0 commit comments

Comments
 (0)