Use es6 notation in weatherprovider

This commit is contained in:
rejas
2021-04-18 14:53:15 +02:00
parent 376b65c749
commit 838eed2630
2 changed files with 8 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
*
* This class is the blueprint for a weather provider.
*/
var WeatherProvider = Class.extend({
const WeatherProvider = Class.extend({
// Weather Provider Properties
providerName: null,
defaults: {},
@@ -114,7 +114,7 @@ var WeatherProvider = Class.extend({
// A convenience function to make requests. It returns a promise.
fetchData: function (url, method = "GET", data = null) {
return new Promise(function (resolve, reject) {
var request = new XMLHttpRequest();
const request = new XMLHttpRequest();
request.open(method, url, true);
request.onreadystatechange = function () {
if (this.readyState === 4) {