Linting.
This commit is contained in:
parent
472305d214
commit
eca97f6f57
|
@ -2,8 +2,10 @@ const COOKIE_SEPARATOR = ";"
|
||||||
const APP_PREFIX = "app_"
|
const APP_PREFIX = "app_"
|
||||||
const KEY_VALUE_SPLIT = "="
|
const KEY_VALUE_SPLIT = "="
|
||||||
|
|
||||||
export const getAppId = (allCookies) => {
|
export const getAppId = allCookies => {
|
||||||
const cookie = allCookies.split(COOKIE_SEPARATOR).find(cookie => cookie.trim().startsWith("budibase:currentapp"))
|
const cookie = allCookies
|
||||||
|
.split(COOKIE_SEPARATOR)
|
||||||
|
.find(cookie => cookie.trim().startsWith("budibase:currentapp"))
|
||||||
let appId = location.pathname.split("/")[1]
|
let appId = location.pathname.split("/")[1]
|
||||||
appId = appId && appId.startsWith(APP_PREFIX) ? appId : undefined
|
appId = appId && appId.startsWith(APP_PREFIX) ? appId : undefined
|
||||||
if (!appId && cookie && cookie.split(KEY_VALUE_SPLIT).length === 2) {
|
if (!appId && cookie && cookie.split(KEY_VALUE_SPLIT).length === 2) {
|
||||||
|
|
Loading…
Reference in New Issue