Last active
November 9, 2018 19:47
-
-
Save noili/a5d0d0472957e18ac72f630f17b225b7 to your computer and use it in GitHub Desktop.
WTFFF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compareOrigin(origin) { | |
let value; | |
const inMemory = JSON.parse(sessionStorage.getItem('allChipcards')); | |
switch (window.location.pathname.split('/').includes('callcenter')) { // extract condition to method change to iff | |
case false: | |
if (inMemory === null) { | |
value = this.translate.currentLang === 'es' ? 'publico' : 'public'; //breaks TDA | |
} else { | |
value = this.translate.currentLang === 'es' ? 'privado' : 'private'; //breaks TDA | |
} | |
break; | |
case true: | |
value = 'callcenter'; | |
break; | |
default: | |
break; | |
} | |
return value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment