Fixed parent.id => parentId
This commit is contained in:
@@ -204,7 +204,7 @@ export function getPropertyChildren(creatureId, property) {
|
||||
return cloneProps.sort((a, b) => a.left - b.left);
|
||||
} else {
|
||||
return CreatureProperties.find({
|
||||
'parent.id': property._id,
|
||||
'parentId': property._id,
|
||||
removed: { $ne: true },
|
||||
}, {
|
||||
sort: { order: 1 },
|
||||
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
|
||||
return CreatureProperties.find({
|
||||
...getFilter.descendantsOfRoot(this.creatureId),
|
||||
'parent.id': {
|
||||
'parentId': {
|
||||
$nin: folderIds,
|
||||
},
|
||||
type: 'action',
|
||||
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
|
||||
return CreatureProperties.find({
|
||||
...getFilter.descendantsOfRoot(this.creatureId),
|
||||
'parent.id': {
|
||||
'parentId': {
|
||||
$nin: folderIds,
|
||||
},
|
||||
type: 'feature',
|
||||
|
||||
@@ -156,7 +156,7 @@ export default {
|
||||
containers() {
|
||||
return CreatureProperties.find({
|
||||
...getFilter.descendantsOfRoot(this.creatureId),
|
||||
'parent.id': {
|
||||
'parend': {
|
||||
$nin: this.folderIds,
|
||||
},
|
||||
type: 'container',
|
||||
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
sort: { order: 1 },
|
||||
}).map(c => {
|
||||
c.items = CreatureProperties.find({
|
||||
'parent.id': c._id,
|
||||
'parentId': c._id,
|
||||
type: { $in: ['item', 'container'] },
|
||||
removed: { $ne: true },
|
||||
equipped: { $ne: true },
|
||||
|
||||
@@ -188,7 +188,7 @@ export default {
|
||||
const docName = this.doc.name;
|
||||
let parentHref = '/docs';
|
||||
if (this.doc.parent) {
|
||||
const parent = Docs.findOne({ _id: this.doc.parent.id });
|
||||
const parent = Docs.findOne({ _id: this.doc.parentId });
|
||||
parentHref = parent?.href || parentHref;
|
||||
}
|
||||
softRemoveDoc.call({ _id }, (error) => {
|
||||
|
||||
@@ -97,7 +97,7 @@ export default {
|
||||
let currentDoc = undefined;
|
||||
this.path.split('/').forEach(urlName => {
|
||||
currentDoc = Docs.findOne({
|
||||
urlName, 'parent.id': currentDoc?._id,
|
||||
urlName, 'parentId': currentDoc?._id,
|
||||
removed: { $ne: true },
|
||||
})
|
||||
if (currentDoc) {
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
sort: { order: 1 }
|
||||
});
|
||||
return Docs.find({
|
||||
'parent.id': this.doc._id,
|
||||
'parentId': this.doc._id,
|
||||
removed: { $ne: true },
|
||||
}, {
|
||||
sort: { order: 1 }
|
||||
@@ -125,7 +125,7 @@ export default {
|
||||
siblingDocs() {
|
||||
if (!this.doc) return [];
|
||||
return Docs.find({
|
||||
'parent.id': this.doc.parent?.id,
|
||||
'parentId': this.doc.parent?.id,
|
||||
removed: { $ne: true },
|
||||
}, {
|
||||
sort: { order: 1 }
|
||||
|
||||
@@ -41,7 +41,7 @@ export default {
|
||||
properties() {
|
||||
const props = [];
|
||||
CreatureProperties.find({
|
||||
'parent.id': this.model._id,
|
||||
'parentId': this.model._id,
|
||||
removed: { $ne: true },
|
||||
overridden: { $ne: true },
|
||||
$or: [
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
properties() {
|
||||
const props = [];
|
||||
CreatureProperties.find({
|
||||
'parent.id': this.model._id,
|
||||
'parentId': this.model._id,
|
||||
removed: { $ne: true },
|
||||
overridden: { $ne: true },
|
||||
$or: [
|
||||
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
});
|
||||
const slotIds = slots.map(s => s._id);
|
||||
const slotChildren = CreatureProperties.find({
|
||||
'parent.id': { $in: slotIds },
|
||||
'parentId': { $in: slotIds },
|
||||
removed: { $ne: true },
|
||||
}, {
|
||||
sort: { order: 1 },
|
||||
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
meteor: {
|
||||
items() {
|
||||
return CreatureProperties.find({
|
||||
'parent.id': this.model._id,
|
||||
'parentId': this.model._id,
|
||||
type: { $in: ['item', 'container'] },
|
||||
removed: { $ne: true },
|
||||
equipped: { $ne: true },
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
// Get the properties that need to be shown as a health bar
|
||||
return CreatureProperties.find({
|
||||
'ancestors.id': this.model._id,
|
||||
'parent.id': {
|
||||
'parentId': {
|
||||
$nin: folderIds,
|
||||
},
|
||||
type: 'attribute',
|
||||
|
||||
@@ -297,7 +297,7 @@ export default {
|
||||
// Get the properties that need to be shown as an icon
|
||||
const filter = {
|
||||
'ancestors.id': this.creatureId,
|
||||
'parent.id': {
|
||||
'parentId': {
|
||||
$nin: folderIds,
|
||||
},
|
||||
$and: [
|
||||
|
||||
Reference in New Issue
Block a user