A platform for community discussion. Free, open, simple.
DEV: Make plugin api errors more descriptive (#15111)
David Taylor5d59b7e733ac
diff --git a/app/assets/javascripts/discourse/app/lib/plugin-api.js b/app/assets/javascripts/discourse/app/lib/plugin-api.jsindex b897b219f4e..d11adef5f16 100644--- a/app/assets/javascripts/discourse/app/lib/plugin-api.js+++ b/app/assets/javascripts/discourse/app/lib/plugin-api.js@@ -102,7 +102,7 @@ function canModify(klass, type, resolverName, changes) {if (!changes.pluginId) {// eslint-disable-next-line no-consoleconsole.warn(- "To prevent errors, add a `pluginId` key to your changes when calling `modifyClass`"+ "To prevent errors in tests, add a `pluginId` key to your `modifyClass` call. This will ensure the modification is only applied once.");return true;}@@ -1629,7 +1629,7 @@ function decorate(klass, evt, cb, id) {if (!id) {// eslint-disable-next-line no-consoleconsole.warn(- "`decorateCooked` should be supplied with an `id` option to avoid memory leaks."+ "`decorateCooked` should be supplied with an `id` option to avoid memory leaks in test mode. The id will be used to ensure the decorator is only applied once.");} else {if (!_decorated.has(klass)) {