ractivejs / ractive-load

Import templates and components using AJAX
ractivejs.github.io/ractive-load
MIT License
55 stars 10 forks source link

`loadFromLinks` method signature mismatch with `loadSingle` #7

Open martypdx opened 10 years ago

martypdx commented 10 years ago
return function loadFromLinks( baseUrl, cache ) {
...
    links.forEach( function( link ) {
    var name = getNameFromLink( link );
    // one, two, three
    loadSingle( link.getAttribute( 'href' ), baseUrl, cache ).then(...
// one, two, three, four
function loadSingle( path, parentUrl, baseUrl, cache ) {
    var promise, url;
    ...
MartinKolarik commented 10 years ago

Also, I noticed now that I didn't add the fourth parameter here:

// line 379
loadImport: function( name, path, parentUrl, callback ) {
    loadSingle( path, parentUrl, baseUrl ).then( callback, reject );
}