diff --git a/src/session/appRouter/getFlag.js b/src/session/appRouter/getFlag.js index c8e0ee1..f18f25d 100644 --- a/src/session/appRouter/getFlag.js +++ b/src/session/appRouter/getFlag.js @@ -10,7 +10,7 @@ export const getFlag = (code, defaultValue, flagType) => { const flags = getClaim('feature_flags'); const flag = flags && flags[code] ? flags[code] : {}; - if (!flag.v && defaultValue == undefined) { + if (flag == {} && defaultValue == undefined) { throw Error( `Flag ${code} was not found, and no default value has been provided` ); diff --git a/src/session/pagesRouter/getFlag.js b/src/session/pagesRouter/getFlag.js index c8e0ee1..f18f25d 100644 --- a/src/session/pagesRouter/getFlag.js +++ b/src/session/pagesRouter/getFlag.js @@ -10,7 +10,7 @@ export const getFlag = (code, defaultValue, flagType) => { const flags = getClaim('feature_flags'); const flag = flags && flags[code] ? flags[code] : {}; - if (!flag.v && defaultValue == undefined) { + if (flag == {} && defaultValue == undefined) { throw Error( `Flag ${code} was not found, and no default value has been provided` );