@@ -329,14 +329,14 @@ Module.register("weather", {
329329 addFilters ( ) {
330330 this . nunjucksEnvironment ( ) . addFilter (
331331 "formatTime" ,
332- function ( date ) {
332+ ( date ) => {
333333 return formatTime ( this . config , date ) ;
334- } . bind ( this )
334+ }
335335 ) ;
336336
337337 this . nunjucksEnvironment ( ) . addFilter (
338338 "unit" ,
339- function ( value , type , valueUnit ) {
339+ ( value , type , valueUnit ) => {
340340 let formattedValue ;
341341 if ( type === "temperature" ) {
342342 if ( value === null || value === undefined ) {
@@ -365,40 +365,40 @@ Module.register("weather", {
365365 formattedValue = WeatherUtils . convertWind ( value , this . config . windUnits ) ;
366366 }
367367 return formattedValue ;
368- } . bind ( this )
368+ }
369369 ) ;
370370
371371 this . nunjucksEnvironment ( ) . addFilter (
372372 "roundValue" ,
373- function ( value ) {
373+ ( value ) => {
374374 return this . roundValue ( value ) ;
375- } . bind ( this )
375+ }
376376 ) ;
377377
378378 this . nunjucksEnvironment ( ) . addFilter (
379379 "decimalSymbol" ,
380- function ( value ) {
380+ ( value ) => {
381381 return value . toString ( ) . replace ( / \. / g, this . config . decimalSymbol ) ;
382- } . bind ( this )
382+ }
383383 ) ;
384384
385385 this . nunjucksEnvironment ( ) . addFilter (
386386 "calcNumSteps" ,
387- function ( forecast ) {
387+ ( forecast ) => {
388388 return Math . min ( forecast . length , this . config . maxNumberOfDays ) ;
389- } . bind ( this )
389+ }
390390 ) ;
391391
392392 this . nunjucksEnvironment ( ) . addFilter (
393393 "calcNumEntries" ,
394- function ( dataArray ) {
394+ ( dataArray ) => {
395395 return Math . min ( dataArray . length , this . config . maxEntries ) ;
396- } . bind ( this )
396+ }
397397 ) ;
398398
399399 this . nunjucksEnvironment ( ) . addFilter (
400400 "opacity" ,
401- function ( currentStep , numSteps ) {
401+ ( currentStep , numSteps ) => {
402402 if ( this . config . fade && this . config . fadePoint < 1 ) {
403403 if ( this . config . fadePoint < 0 ) {
404404 this . config . fadePoint = 0 ;
@@ -413,7 +413,7 @@ Module.register("weather", {
413413 } else {
414414 return 1 ;
415415 }
416- } . bind ( this )
416+ }
417417 ) ;
418418 }
419419} ) ;
0 commit comments