title: AngularJS 1.6 - $onChanges executing twice
body: <p>I could be over-thinking this and that's why I'm here.  :)</p>
  
  <p>Note: In the following example, the object "ctrl" is component's controller alias.  <strong>var ctrl = this;</strong></p>
  
  <p>Let's say we have a component that has two bindings where one is optional:</p>
  
  <pre><code>bindings: { 
     params: '&lt;', 
     company: '&lt;?' 
  }
  </code></pre>
  
  <p>Sometimes the company is available, sometimes it's not.</p>
  
  <p>The $onChanges looks something like:</p>
  
  <pre><code>ctrl.$onChanges = function(changes) {
      if (changes.params || changes.company) {
          console.log('executed');
      }
  }
  </code></pre>
  
  <p>It seems that when both bindings are updated, $onChanges runs twice.  The first time, ctrl.company (the binding) is null in the component even though I did indeed update that binding with a value.  The second time, ctrl.company has it's value.</p>
  
  <p>Now, I understand that the OR operation may not be correct.  I'm just a little uncertain about how $onChanges functions.</p>
  
  <p>I'll update if my description of the problem is unclear.</p>
  
  <p>Thanks in advance.</p>