Skip to content

Commit

Permalink
Fixed forEach issue on settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
mape committed Sep 23, 2010
1 parent 7d35d39 commit 389810c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions lib/assetmanager.js
Expand Up @@ -7,10 +7,18 @@ var sys = require('sys'),
cssmin = require('./../deps/cssmin').minify;
var cache = {};

module.exports = function assetManager (settings)
{
module.exports = function assetManager (settings) {
var self = this;
this.cacheTimestamps = {};
if (!settings.forEach) {
settings.forEach = function(callback) {
Object.keys(this).forEach(function(key) {
if (key !== 'forEach') {
callback(settings[key], key);
}
});
}
}

this.generateCache = function (generateGroup) {
var self = this;
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name" : "connect-assetmanager",
"description" : "Middleware for Connect (node.js) for handling your static assets.",
"version" : "0.0.5",
"version" : "0.0.6",
"author" : "Mathias Pettersson <mape@mape.me>",
"engines" : ["node"],
"directories" : { "lib" : "./lib" },
Expand Down

0 comments on commit 389810c

Please sign in to comment.