Check position against null, not zero

a8ac3142 had a bug in which a switch at position zero would not result
in clearing anything.  Positions may validly be zero, but never null.

Change-Id: I95a607df7bd6a41cf73f78122c3dcdda425fb145
This commit is contained in:
Joey Parrish
2016-09-29 13:56:04 -07:00
parent 7f7e6d7568
commit 4593cf789a
+2 -2
View File
@@ -478,14 +478,14 @@ shaka.media.StreamingEngine.prototype.clear_ = function(mediaState, clear) {
goog.asserts.assert(position != null,
'No segment under the playhead! This should not happen!');
if (!position) {
if (position == null) {
return;
}
var reference = mediaState.stream.getSegmentReference(position);
goog.asserts.assert(reference != null,
'No reference for current position! This should not happen!');
if (!reference) {
if (reference == null) {
return;
}