Permalink
Browse files

Fixes issue where the text plugin does not honour 'empty:' config bat…

…hs when building using r.js

References the r.js issue #493 (requirejs/r.js#493). User who reported that issue has not created the issue on the text repository.
  • Loading branch information...
1 parent 9cb21c8 commit 6f6168375ea103c5e461947906c3836ecbf9c85a @dakota dakota committed Aug 2, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 text.js
View
@@ -176,6 +176,12 @@ define(['module'], function (module) {
useXhr = (masterConfig.useXhr) ||
text.useXhr;
+ // Do not load if it is an empty: url
+ if (url.indexOf('empty:') === 0) {
+ onLoad();
+ return;
+ }
+
//Load the text. Use XHR if possible and in a browser.
if (!hasLocation || useXhr(url, defaultProtocol, defaultHostName, defaultPort)) {
text.get(url, function (content) {

0 comments on commit 6f61683

Please sign in to comment.