Skip to content

Commit baaa763

Browse files
committed
fix(ModuleConfig): Ensure cache exists before clearing it when unloading Quick
1 parent 4d6a77d commit baaa763

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ModuleConfig.cfc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ component {
7474
}
7575

7676
function onUnload() {
77-
wirebox
78-
.getCachebox()
79-
.getCache( settings.metadataCache.name )
80-
.clearAll();
77+
var cacheBox = wirebox.getCachebox();
78+
if ( cacheBox.cacheExists( settings.metadataCache.name ) ) {
79+
cacheBox.getCache( settings.metadataCache.name ).clearAll();
80+
}
8181
}
8282

8383

0 commit comments

Comments
 (0)