Skip to content

Commit

Permalink
Changed silent null check to thrown error in isVideo method
Browse files Browse the repository at this point in the history
  • Loading branch information
a2wd committed Aug 9, 2016
1 parent fdd5346 commit 11943da
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/js/lightgallery.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**!
* lightgallery.js | 0.0.1 | August 4th 2016
* lightgallery.js | 0.0.1 | August 9th 2016
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2016 Sachin N;
* @license Apache 2.0
Expand Down Expand Up @@ -622,8 +622,8 @@
*/
Plugin.prototype.isVideo = function (src, index) {

if (!src || !index) {
return false;
if (!src) {
throw new Error("No value was provided to isVideo for the src parameter, please check that slide " + index + " has an image/video src");
}

var html;
Expand Down
Loading

0 comments on commit 11943da

Please sign in to comment.