Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for audiodata to safely handle window.Audio not existing

  • Loading branch information...
commit ea1afd79655203b8676fe065bb15ffe525f8c0b3 1 parent 5d27904
@jsantell authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  feature-detects/audio-audiodata-api.js
View
2  feature-detects/audio-audiodata-api.js
@@ -1,4 +1,4 @@
// Mozilla Audio Data API
// https://wiki.mozilla.org/Audio_Data_API
// by Addy Osmani
-Modernizr.addTest('audiodata', !!(new window.Audio()).mozSetup);
+Modernizr.addTest('audiodata', !!(window.Audio && (new window.Audio()).mozSetup));
Please sign in to comment.
Something went wrong with that request. Please try again.