current.njk JS error and Loading string

This commit is contained in:
vincep5 2019-01-17 08:54:16 -06:00
parent 29384c2ba3
commit 2e03868021
4 changed files with 7 additions and 6 deletions

View File

@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added humidity support to nunjuck unit filter. - Added humidity support to nunjuck unit filter.
- Do not display degree symbol for temperature in Kelvin [#1503](https://github.com/MichMich/MagicMirror/issues/1503). - Do not display degree symbol for temperature in Kelvin [#1503](https://github.com/MichMich/MagicMirror/issues/1503).
- Added fade, fadePoint and maxNumberOfDays properties to the forecast mode [#1516](https://github.com/MichMich/MagicMirror/issues/1516) - Added fade, fadePoint and maxNumberOfDays properties to the forecast mode [#1516](https://github.com/MichMich/MagicMirror/issues/1516)
- Fixed Loading string and decimalSymbol string replace [#1538](https://github.com/MichMich/MagicMirror/issues/1538)
## [2.6.0] - 2019-01-01 ## [2.6.0] - 2019-01-01

View File

@ -65,9 +65,9 @@
{% endif %} {% endif %}
{% else %} {% else %}
<div class="dimmed light small"> <div class="dimmed light small">
{{ "LOADING" | translate }} {{ "LOADING" | translate | safe }}
</div> </div>
{% endif %} {% endif %}
<!-- Unclomment the line below to see the contents of the `current` object. --> <!-- Uncomment the line below to see the contents of the `current` object. -->
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{current | dump}}</div> --> <!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{current | dump}}</div> -->

View File

@ -24,9 +24,9 @@
</table> </table>
{% else %} {% else %}
<div class="dimmed light small"> <div class="dimmed light small">
{{ "LOADING" | translate }} {{ "LOADING" | translate | safe }}
</div> </div>
{% endif %} {% endif %}
<!-- Unclomment the line below to see the contents of the `current` object. --> <!-- Uncomment the line below to see the contents of the `current` object. -->
<!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{forecast | dump}}</div> --> <!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{forecast | dump}}</div> -->

View File

@ -62,7 +62,7 @@ Module.register("weather",{
return ["font-awesome.css", "weather-icons.css", "weather.css"]; return ["font-awesome.css", "weather-icons.css", "weather.css"];
}, },
// Return the scripts that are nessecery for the weather module. // Return the scripts that are necessary for the weather module.
getScripts: function () { getScripts: function () {
return [ return [
"moment.js", "moment.js",
@ -218,7 +218,7 @@ Module.register("weather",{
}.bind(this)); }.bind(this));
this.nunjucksEnvironment().addFilter("decimalSymbol", function(value) { this.nunjucksEnvironment().addFilter("decimalSymbol", function(value) {
return value.replace(/\./g, this.config.decimalSymbol); return value.toString().replace(/\./g, this.config.decimalSymbol);
}.bind(this)); }.bind(this));
this.nunjucksEnvironment().addFilter("calcNumSteps", function(forecast) { this.nunjucksEnvironment().addFilter("calcNumSteps", function(forecast) {