title: Uncaught TypeError: Cannot read property 'endsWith' of undefined at LayoutGapStyleBuilder.buildStyles
body: <p>After upgrading my Angular 8 application to Angular 9, I get the following error in the browser for one template:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'endsWith' of undefined
      at LayoutGapStyleBuilder.buildStyles (flex.js:233)
      at DefaultLayoutGapDirective.addStyles (core.js:492)
      at DefaultLayoutGapDirective.updateWithValue (flex.js:434)
      at MediaMarshaller.updateElement (core.js:3189)
      at SafeSubscriber._next (core.js:3294)
      at SafeSubscriber.__tryOrUnsub (Subscriber.js:183)
      at SafeSubscriber.next (Subscriber.js:122)
      at Subscriber._next (Subscriber.js:72)
      at Subscriber.next (Subscriber.js:49)
      at MergeMapSubscriber.notifyNext (mergeMap.js:72)
      at InnerSubscriber._next (InnerSubscriber.js:11)
      at InnerSubscriber.next (Subscriber.js:49)
      at Subject.next (Subject.js:39)
      at MutationObserver.&lt;anonymous&gt; (flex.js:493)
      at ZoneDelegate.invoke (zone-evergreen.js:365)
  </code></pre>