Skip to content

Commit

Permalink
Fix #1024 upload when ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
jtommy committed Oct 10, 2018
1 parent f1844d1 commit 1e36bdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/upload/Upload.vue
Expand Up @@ -32,6 +32,7 @@

<script>
import FormElementMixin from '../../utils/FormElementMixin'
import { File } from '../../utils/ssr'
export default {
name: 'BUpload',
Expand Down
1 change: 1 addition & 0 deletions src/utils/ssr.js
Expand Up @@ -3,3 +3,4 @@
export const isSSR = typeof window === 'undefined'

export const HTMLElement = isSSR ? Object : window.HTMLElement
export const File = isSSR ? Object : window.File

0 comments on commit 1e36bdc

Please sign in to comment.