Skip to content

Commit

Permalink
clean up console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
berviantoleo committed Apr 15, 2022
1 parent 2cb13c3 commit db3c9bd
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const getToken = async (): Promise<string> => {
const featureFlag = async (flag: string): Promise<boolean> => {
if (!existingToken) {
existingToken = await getToken();
console.log(existingToken);
}
try {
const command = new GetLatestConfigurationCommand({
Expand All @@ -36,14 +35,12 @@ const featureFlag = async (flag: string): Promise<boolean> => {
str += String.fromCharCode(response.Configuration[i]);
}
const allFlag = JSON.parse(str);
console.log(allFlag);
flags = Object.assign({}, allFlag);
}
return Boolean(flags[flag]?.enabled);
} catch (err) {
if (err instanceof BadRequestException) {
existingToken = await getToken();
console.log(existingToken);
// recall
return featureFlag(flag);
} else {
Expand Down

0 comments on commit db3c9bd

Please sign in to comment.