Use property for calculating handler name

Replace usage of .constructor.name with a separate property to avoid
issue with JavaScript terser mangling the class name during minification
for the web build.
This commit is contained in:
Hornwitser committed 2020-09-28 04:23:45 +02:00
1 parent f1f9b4d020
commit 392a7655c4
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -433,7 +433,7 @@ function attachPluginMessages(link, pluginInfo, plugin) {
throw new Error(`Type of ${name} message must start with "${pluginInfo.name}:"`);
}
let handler = name + messageFormat.constructor.name + "Handler";
let handler = name + messageFormat.handlerSuffix;
if (plugin === null || !plugin[handler]) {
messageFormat.attach(link);