mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +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:
parent
fa66d1fa82
commit
09764291b1
6 changed files with 66 additions and 19 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue