Skip to content

Commit

Permalink
v0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Kolárik committed Jul 22, 2014
1 parent f5b0cc9 commit ba0344c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ractive-load",
"version": "0.3.0",
"version": "0.3.1",
"author": {
"name": "Rich Harris"
},
Expand Down
12 changes: 7 additions & 5 deletions ractive-load.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
ractive-load - v0.3.0 - 2014-07-05
ractive-load - v0.3.1 - 2014-07-22
===================================================================
Next-generation DOM manipulation - http://ractivejs.org
Expand Down Expand Up @@ -325,7 +325,7 @@
var utils_get = function() {

var get;
if ( typeof XMLHttpRequest === 'function' ) {
if ( typeof XMLHttpRequest !== 'undefined' ) {
get = function( url ) {
return new Ractive.Promise( function( fulfil, reject ) {
var xhr, onload, loaded;
Expand Down Expand Up @@ -365,7 +365,8 @@

var load_single = function( rcu, get, modules ) {

var promises = {}, global = typeof window !== 'undefined' ? window : {};
var promises = {},
global = typeof window !== 'undefined' ? window : {};
return loadSingle;

function loadSingle( path, parentUrl, baseUrl, cache ) {
Expand Down Expand Up @@ -404,7 +405,7 @@
}
if ( !dependency ) {
qualified = !/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test( name ) ? '["' + name + '"]' : '.' + name;
throw new Error( 'Ractive.load() error: Could not find dependency "' + name + '". It should be exposed as Ractive.lib' + qualified + ' or window' + qualified );
throw new Error( 'Ractive.load() error: Could not find dependency "' + name + '". It should be exposed as Ractive.load.modules' + qualified + ' or window' + qualified );
}
return dependency;
}
Expand Down Expand Up @@ -449,7 +450,8 @@
return function loadMultiple( map, baseUrl, cache ) {
var promise = new Ractive.Promise( function( resolve, reject ) {
var pending = 0,
result = {}, name, load;
result = {},
name, load;
load = function( name ) {
var path = map[ name ];
loadSingle( path, baseUrl, baseUrl, cache ).then( function( Component ) {
Expand Down
2 changes: 1 addition & 1 deletion ractive-load.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ba0344c

Please sign in to comment.