fix(ssr): remove context

This commit is contained in:
qingwei.li 2017-05-30 06:32:41 +08:00
commit 46261572e3
No known key found for this signature in database
GPG key ID: B6DDC2F7AE80B2F4
12 changed files with 58 additions and 59 deletions

View file

@ -1,5 +1,4 @@
import { cached } from '../util/core'
import { inBrowser } from '../util/env'
const decode = decodeURIComponent
const encode = encodeURIComponent
@ -32,15 +31,6 @@ export function stringifyQuery (obj) {
return qs.length ? `?${qs.join('&')}` : ''
}
export const getBasePath = cached((base = '') => {
// TODO
const path = inBrowser ? window.location.pathname : ''
return /^(\/|https?:)/g.test(base)
? base
: cleanPath(path + '/' + base)
})
export function getPath (...args) {
return cleanPath(args.join('/'))
}