diff --git a/lib/text/text_engine.js b/lib/text/text_engine.js
index <HASH>..<HASH> 100644
--- a/lib/text/text_engine.js
+++ b/lib/text/text_engine.js
@@ -452,8 +452,6 @@ shaka.text.TextEngine.prototype.getNumberOfClosedCaptionChannels = function() {
  */
 shaka.text.TextEngine.prototype.getNumberOfClosedCaptionsInChannel =
     function(id) {
-  if (!this.closedCaptionsMap_ || ! this.closedCaptionsMap_.get(id)) {
-    return 0;
-  }
-  return this.closedCaptionsMap_.get(id).size;
+  const channel = this.closedCaptionsMap_.get(id);
+  return channel ? channel.size : 0;
 };
Remove Redundant Null Check in TextEngine

The close caption map cannot be null in text engine, but we were
still checking if it was falsy. Since it can't be null, we can remove
the falsy check.

With the falsy check removed, the expression was able to be reduce
even further.

Change-Id: I<I>bc<I>cfa<I>cc6b<I>b<I>e<I>f<I>b0e<I>