```
      if (hasTranscludeDirective) {
        nodeLinkFn.transcludeOnThisElement = true;
      } else if (!templateDirective) {
        nodeLinkFn.transcludeOnThisElement = false;
      }
```

is equivalent to

```
nodeLinkFn.transcludeOnThisElement = hasTranscludeElement
```

since the default of this property is `undefined` (i.e. falsy)