summaryrefslogtreecommitdiffstatshomepage
path: root/core/misc/message.es6.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/misc/message.es6.js')
-rw-r--r--core/misc/message.es6.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/misc/message.es6.js b/core/misc/message.es6.js
index 2390ab0565a4..9db487cd9085 100644
--- a/core/misc/message.es6.js
+++ b/core/misc/message.es6.js
@@ -2,7 +2,7 @@
* @file
* Message API.
*/
-(Drupal => {
+((Drupal) => {
/**
* @typedef {class} Drupal.Message~messageDefinition
*/
@@ -104,9 +104,7 @@
*/
options.id = options.id
? String(options.id)
- : `${options.type}-${Math.random()
- .toFixed(15)
- .replace('0.', '')}`;
+ : `${options.type}-${Math.random().toFixed(15).replace('0.', '')}`;
// Throw an error if an unexpected message type is used.
if (!Drupal.Message.getMessageTypeLabels().hasOwnProperty(options.type)) {
@@ -164,7 +162,7 @@
clear() {
Array.prototype.forEach.call(
this.messageWrapper.querySelectorAll('[data-drupal-message-id]'),
- message => {
+ (message) => {
this.messageWrapper.removeChild(message);
},
);