Skip to content

Commit 2e7fee7

Browse files
committed
Fix clearing cache.
1 parent 5df6090 commit 2e7fee7

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

image.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,11 @@ Image.prototype.command = function(key, value, priority, esc) {
674674
return this.push(key, value, priority || 10, esc);
675675
};
676676

677+
// Clears cache with commands
678+
Image.clear = function() {
679+
CACHE = {};
680+
};
681+
677682
function wrap(command, empty) {
678683
var cmd = '';
679684
for (var i = 0, length = command.length; i < length; i++)
@@ -700,8 +705,4 @@ exports.middleware = function(type, fn) {
700705

701706
exports.restart = function() {
702707
middlewares = {};
703-
};
704-
705-
exports.clear = function() {
706-
CACHE = {};
707708
};

0 commit comments

Comments
 (0)