Browse Source

fix: bluebird isn't being used

Signed-off-by: Jonathan <theflametrooper@gmail.com>
Jonathan 5 năm trước cách đây
mục cha
commit
5bdbbf52c9
2 tập tin đã thay đổi với 6 bổ sung8 xóa
  1. 6 7
      lofig.js
  2. 0 1
      package.json

+ 6 - 7
lofig.js

@@ -21,13 +21,12 @@ window.lofig = {
 			.then(response => {
 				return response.json();
 			}).then(json => {
-				query = query.split('.');
-				return Promise.each(query, property => {
-					json = json[property];
-				}).then(() => {
-					if (json) return true;
-					else return false;
-				});
+				query.split('.')
+					.forEach(property => {
+						json = json[property];
+					});
+
+				return json;
 			}).catch(err => {
 				console.log('parsing failed', err);
 			});

+ 0 - 1
package.json

@@ -15,7 +15,6 @@
     "babel-loader": "^8.0.6",
     "babel-polyfill": "^6.26.0",
     "babel-preset-es2015": "^6.24.1",
-    "bluebird": "^3.5.5",
     "exports-loader": "^0.7.0",
     "imports-loader": "^0.8.0",
     "snyk": "^1.226.1",