Skip to content

Commit 0b059af

Browse files
authored
Merge pull request phaserjs#5107 from samme/fix/html5-audio-dataset
Fix TypeError when loading HTML5AudioFile
2 parents 6c47e3d + c472a50 commit 0b059af

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/loader/filetypes/HTML5AudioFile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ var HTML5AudioFile = new Class({
148148
for (var i = 0; i < instances; i++)
149149
{
150150
var audio = new Audio();
151-
audio.dataset = {};
151+
152+
if (!audio.dataset)
153+
{
154+
audio.dataset = {};
155+
}
156+
152157
audio.dataset.name = this.key + ('0' + i).slice(-2);
153158
audio.dataset.used = 'false';
154159

0 commit comments

Comments
 (0)