Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Logic problem
Message
Information générale
Forum:
HTML5
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01657073
Message ID:
01658045
Vues:
40
>You have mixed AND and ORs w/o any parenthesis to distinct how they should be tested.
>So maybe this should be:
>
>if( (this.form && !this.form.$dirty) || 
>    (this.parentForm && !this.parentForm.$dirty))
>...
>
It is not my code, but I was thinking about something like this and both times I restored back to original code. This one doesn't seem correct to me. It doesn't do (I think) what the intent of the code is. The intent is to check if the forms defined. If they are defined, they should be both in pristine state. If they are not defined, then nothing to check.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform