Skip to content

Commit

Permalink
current.njk JS error and Loading string
Browse files Browse the repository at this point in the history
  • Loading branch information
vincep5 committed Jan 17, 2019
1 parent 29384c2 commit 2e03868
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Added humidity support to nunjuck unit filter.
- 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)
- Fixed Loading string and decimalSymbol string replace [#1538](https://github.com/MichMich/MagicMirror/issues/1538)

## [2.6.0] - 2019-01-01

Expand Down
4 changes: 2 additions & 2 deletions modules/default/weather/current.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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> -->
4 changes: 2 additions & 2 deletions modules/default/weather/forecast.njk
Original file line number Diff line number Diff line change
Expand Up @@ -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> -->
4 changes: 2 additions & 2 deletions modules/default/weather/weather.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 2e03868

Please sign in to comment.