mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +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:
@ -82,6 +82,7 @@ function initializeDiscourseLocalDates(api) {
|
||||
});
|
||||
|
||||
api.modifyClass("component:d-editor", {
|
||||
pluginId: "discourse-local-dates",
|
||||
actions: {
|
||||
insertDiscourseLocalDate(toolbarEvent) {
|
||||
showModal("discourse-local-dates-create-modal").setProperties({
|
||||
|
Reference in New Issue
Block a user