mirror of
https://github.com/discourse/discourse.git
synced 2025-05-25 19:29:34 +08:00
FIX: In test mode, initializers were modifying classes over and over
This adds a new property, `pluginId` which you can pass to `modifyClass` which prevent the class from being modified over and over again. This also includes a fix for polls which was leaking state between tests which this new functionality exposed.
This commit is contained in:
@ -15,6 +15,7 @@ function initializeDetails(api) {
|
||||
});
|
||||
|
||||
api.modifyClass("controller:composer", {
|
||||
pluginId: "discourse-details",
|
||||
actions: {
|
||||
insertDetails() {
|
||||
this.toolbarEvent.applySurround(
|
||||
|
Reference in New Issue
Block a user