Skip to content

Commit e4f4376

Browse files
committed
Merge pull request #3 from bdw429s/bdw429s-patch-1
Remove mixins on module reload.
2 parents ac1416e + b1d17be commit e4f4376

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

modules/cbvalidation/ModuleConfig.cfc

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,17 @@ component{
5959
* Fired when the module is unregistered and unloaded
6060
*/
6161
function onUnload(){
62-
62+
var appHelperArray = controller.getSetting( "ApplicationHelper" );
63+
var mixinToRemove = "#moduleMapping#/models/Mixins.cfm";
64+
var mixinIndex = arrayFindNoCase( appHelperArray, mixinToRemove );
65+
66+
// If the mixin is in the array
67+
if( mixinIndex ) {
68+
// Remove it
69+
arrayDeleteAt( appHelperArray, mixinIndex );
70+
// Arrays passed by value in Adobe CF
71+
controller.setSetting( "ApplicationHelper", appHelperArray );
72+
}
6373
}
6474

6575
/**
@@ -99,4 +109,4 @@ component{
99109
}
100110
}
101111

102-
}
112+
}

0 commit comments

Comments
 (0)