Fix lots of warnings

This commit is contained in:
rejas
2020-04-21 07:36:18 +02:00
parent 941d5d7cd9
commit d08bd4e866
13 changed files with 26 additions and 32 deletions

View File

@@ -22,8 +22,8 @@
initializing = false;
// Make a copy of all prototype properties, to prevent reference issues.
for (var name in prototype) {
prototype[name] = cloneObject(prototype[name]);
for (var p in prototype) {
prototype[p] = cloneObject(prototype[p]);
}
// Copy the properties over onto the new prototype

View File

@@ -1,7 +1,7 @@
/* exported defaults */
/* Magic Mirror
* Config Defauls
* Config Defaults
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.

View File

@@ -1,4 +1,3 @@
/* global console */
/* exported Log */
/* Magic Mirror

View File

@@ -1,4 +1,3 @@
/* global Log, Class, Loader, Class , MM */
/* exported Module */
/* Magic Mirror

View File

@@ -1,4 +1,5 @@
/* exported Translator */
/* Magic Mirror
* Translator (l10n)
*
@@ -129,10 +130,10 @@ var Translator = (function() {
if(Object.prototype.toString.call(template) !== "[object String]") {
return template;
}
if(variables.fallback && !template.match(new RegExp("\{.+\}"))) {
if(variables.fallback && !template.match(new RegExp("{.+}"))) {
template = variables.fallback;
}
return template.replace(new RegExp("\{([^\}]+)\}", "g"), function(_unused, varName){
return template.replace(new RegExp("{([^}]+)}", "g"), function(_unused, varName){
return variables[varName] || "{"+varName+"}";
});
}

View File

@@ -1,4 +1,5 @@
/* exported Utils */
/* Magic Mirror
* Utils
*