diff --git a/build/conformance.textproto b/build/conformance.textproto index a2ffb71ef2..4da03bcc5b 100644 --- a/build/conformance.textproto +++ b/build/conformance.textproto @@ -358,7 +358,7 @@ requirement: { } requirement: { - type: BANNED_PROPERTY + type: BANNED_PROPERTY_CALL value: "String.prototype.replaceAll" error_message: "Using \"String.replaceAll\" is not allowed; " @@ -377,3 +377,9 @@ requirement: { whitelist_regexp: "test/" } +requirement: { + type: BANNED_PROPERTY_CALL + value: "Array.prototype.flat" + error_message: + "Using \"Array.flat\" is not allowed because is not supported on Tizen 3." +} diff --git a/lib/cea/mp4_cea_parser.js b/lib/cea/mp4_cea_parser.js index 69a8936f0b..d89dcd5472 100644 --- a/lib/cea/mp4_cea_parser.js +++ b/lib/cea/mp4_cea_parser.js @@ -270,7 +270,7 @@ shaka.cea.Mp4CeaParser = class { // Combine all sample data. This assumes that the samples described across // multiple trun boxes are still continuous in the mdat box. const sampleDatas = parsedTRUNs.map((t) => t.sampleData); - const sampleData = sampleDatas.flat(); + const sampleData = [].concat(...sampleDatas); if (sampleData.length) { sampleSize = sampleData[0].sampleSize || defaultSampleSize;