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

@@ -65,9 +65,9 @@
{% endif %}
{% else %}
<div class="dimmed light small">
{{ "LOADING" | translate }}
{{ "LOADING" | translate | safe }}
</div>
{% 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> -->

View File

@@ -24,9 +24,9 @@
</table>
{% else %}
<div class="dimmed light small">
{{ "LOADING" | translate }}
{{ "LOADING" | translate | safe }}
</div>
{% 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> -->

View File

@@ -62,7 +62,7 @@ Module.register("weather",{
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 () {
return [
"moment.js",
@@ -218,7 +218,7 @@ Module.register("weather",{
}.bind(this));
this.nunjucksEnvironment().addFilter("decimalSymbol", function(value) {
return value.replace(/\./g, this.config.decimalSymbol);
return value.toString().replace(/\./g, this.config.decimalSymbol);
}.bind(this));
this.nunjucksEnvironment().addFilter("calcNumSteps", function(forecast) {