#104 undefined issue fixed

This commit is contained in:
Agriya Dev5
2021-05-27 16:25:38 +05:30
parent f3ee637903
commit 5c5cf5ddd1

View File

@@ -238,6 +238,7 @@ export default class ConfigObj {
* @returns {void} * @returns {void}
*/ */
loadFromURL () { loadFromURL () {
const self = this;
const { search, searchParams } = new URL(location); const { search, searchParams } = new URL(location);
if (search) { if (search) {
this.urldata = {}; this.urldata = {};
@@ -276,8 +277,8 @@ export default class ConfigObj {
// ways with other script resources // ways with other script resources
[ 'userExtensions', 'imgPath' ] [ 'userExtensions', 'imgPath' ]
.forEach(function (pathConfig) { .forEach(function (pathConfig) {
if (this.urldata[pathConfig]) { if (self.urldata[pathConfig]) {
delete this.urldata[pathConfig]; delete self.urldata[pathConfig];
} }
}); });