1
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
var staticLocation = require('./staticLocation')
|
||||
|
||||
var helperGetLocatOrigin = require('./helperGetLocatOrigin')
|
||||
|
||||
var lastIndexOf = require('./lastIndexOf')
|
||||
|
||||
function getBaseURL () {
|
||||
if (staticLocation) {
|
||||
var pathname = staticLocation.pathname
|
||||
var lastIndex = lastIndexOf(pathname, '/') + 1
|
||||
return helperGetLocatOrigin() + (lastIndex === pathname.length ? pathname : pathname.substring(0, lastIndex))
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
module.exports = getBaseURL
|
||||
Reference in New Issue
Block a user