Commit 09cab629 authored by Pietro Cavassin's avatar Pietro Cavassin
Browse files

change from if to switch

parent 48428386
......@@ -19,10 +19,12 @@ along with simcaq-node. If not, see <https://www.gnu.org/licenses/>.
*/
module.exports = function booleanVariable(id) {
if (id == null || id == "null")
return 'Não Declarado';
else if (id == false)
return 'Não';
else if (id == true)
return 'Sim';
switch(id){
case true:
return 'Sim';
case false:
return 'Não';
default:
return 'Não Declarado';
}
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment