From fd470fbd536598f04e6adbdd20a16019fddb550f Mon Sep 17 00:00:00 2001 From: "Adam A.G. Shamblin" Date: Thu, 10 Apr 2014 12:58:50 -0600 Subject: [PATCH] Address issue #130 --- src/retina.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/retina.js b/src/retina.js index 9087d03..5ac26b4 100644 --- a/src/retina.js +++ b/src/retina.js @@ -60,12 +60,12 @@ root.RetinaImagePath = RetinaImagePath; function RetinaImagePath(path, at_2x_path) { - this.path = path; + this.path = path || ''; if (typeof at_2x_path !== "undefined" && at_2x_path !== null) { this.at_2x_path = at_2x_path; this.perform_check = false; } else { - this.at_2x_path = path.replace(/\.\w+$/, function(match) { return config.retinaImageSuffix + match; }); + this.at_2x_path = this.path.replace(/\.\w+$/, function(match) { return config.retinaImageSuffix + match; }); this.perform_check = true; } }