Created
December 26, 2011 17:09
-
-
Save bryanforbes/1521659 to your computer and use it in GitHub Desktop.
Curl conditional plugin bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function(){ | |
return { | |
normalize: function(id, toAbsId){ | |
var parts = id.split('?'); | |
if(parts[0]){ | |
parts = parts[1].split(':'); | |
return toAbsId(parts[0]); | |
} | |
}, | |
load: function(id, parentRequire, loaded){ | |
if(id){ | |
parentRequire([id], loaded); | |
}else{ | |
loaded(); | |
} | |
} | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function(){ | |
return { | |
one: 1 | |
}; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test Page</title> | |
<script> | |
var curl = { baseUrl: '..' }; | |
</script> | |
<script src="../curl/src/curl.js"></script> | |
<script> | |
curl(['test/decider!condition?test/one:test/two'], function(test){ | |
console.log(test); | |
}); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function(){ | |
return { | |
two: 1 | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment