From 49cdfd7711d5237786c3125db420811c640040b6 Mon Sep 17 00:00:00 2001 From: Kasen IO Date: Thu, 21 May 2020 19:52:43 -0400 Subject: [PATCH] Update folder finder. --- scripts/system/inventory/src/App.vue | 10 ++++------ scripts/system/inventory/src/plugins/store.js | 10 ---------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/scripts/system/inventory/src/App.vue b/scripts/system/inventory/src/App.vue index e9454e9311..4e379d9017 100644 --- a/scripts/system/inventory/src/App.vue +++ b/scripts/system/inventory/src/App.vue @@ -1143,9 +1143,9 @@ export default { return null; }, - recursiveFolderPopulate: function(indexToSearch, firstIteration, avoidFolder) { + recursiveFolderPopulate: function(indexToSearch, avoidFolder) { for (var i = 0; i < indexToSearch.length; i++) { - if (Object.prototype.hasOwnProperty.call(indexToSearch[i], "items") && indexToSearch[i].items.length > 0) { + if (Object.prototype.hasOwnProperty.call(indexToSearch[i], "items")) { // We want to avoid adding the folder itself and also any child folders it may have, putting a folder within its child folder will nuke it. if (avoidFolder !== indexToSearch[i].uuid) { this.recursiveFolderHoldingList.push({ @@ -1153,14 +1153,12 @@ export default { "uuid": indexToSearch[i].uuid, }); - this.recursiveFolderPopulate(indexToSearch[i].items, false, avoidFolder); + this.recursiveFolderPopulate(indexToSearch[i].items, avoidFolder); } } } - if (firstIteration === true) { - return this.recursiveFolderHoldingList; - } + return this.recursiveFolderHoldingList; }, sendInventory: function() { this.sendAppMessage("web-to-script-inventory", this.itemsStore ); diff --git a/scripts/system/inventory/src/plugins/store.js b/scripts/system/inventory/src/plugins/store.js index d8040bc178..33facbf3f2 100644 --- a/scripts/system/inventory/src/plugins/store.js +++ b/scripts/system/inventory/src/plugins/store.js @@ -18,7 +18,6 @@ export const store = new Vuex.Store({ state: { items: [ { - "hasChildren": false, "type": "script", "name": "VRGrabScale", "url": "https://gooawefaweawfgle.com/vr.js", @@ -110,7 +109,6 @@ export const store = new Vuex.Store({ // "uuid": "54354363wgsegs45ujs", // }, { - "hasChildren": false, "type": "script", "name": "VRGrabScale", "url": "https://googfdafsgaergale.com/vr.js", @@ -118,7 +116,6 @@ export const store = new Vuex.Store({ "uuid": "54hgfhgf254354353", }, { - "hasChildren": false, "type": "script", "name": "TEST", "url": "https://gooadfdagle.com/vr.js", @@ -126,7 +123,6 @@ export const store = new Vuex.Store({ "uuid": "542rfwat4t5fsddf4354353", }, { - "hasChildren": false, "type": "json", "name": "TESTJSON", "url": "https://gooadfdagle.com/vr.json", @@ -134,7 +130,6 @@ export const store = new Vuex.Store({ "uuid": "542rfwat4t54354353", }, { - "hasChildren": false, "type": "script", "name": "TESTLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG", "url": "https://googfdaffle.com/vrLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG.js", @@ -142,7 +137,6 @@ export const store = new Vuex.Store({ "uuid": "5425ggsrg45354353", }, { - "hasChildren": false, "type": "whatttype", "name": "BrokenIcon", "url": "https://googfdaffle.com/vrLONGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG.js", @@ -150,7 +144,6 @@ export const store = new Vuex.Store({ "uuid": "5425ggsrg4fdaffdff535asdasd4353", }, { - "hasChildren": false, "type": "avatar", "name": "AVI", "url": "https://googlfadfe.com/vr.fst", @@ -158,7 +151,6 @@ export const store = new Vuex.Store({ "uuid": "542gregg45s3g4354353", }, { - "hasChildren": false, "type": "avatar", "name": "AVI", "url": "https://googlefdaf.com/vr.fst", @@ -166,7 +158,6 @@ export const store = new Vuex.Store({ "uuid": "5420798-087-54354353", }, { - "hasChildren": false, "type": "model", "name": "3D MODEL", "url": "https://googlee.com/vr.fbx", @@ -174,7 +165,6 @@ export const store = new Vuex.Store({ "uuid": "54254354980-7667jt353", }, { - "hasChildren": false, "type": "place", "name": "PLACE DOMAIN", "url": "https://googleee.com/vr.fbx",