mirror of
https://github.com/vale981/grapher
synced 2025-03-05 17:41:41 -05:00
some small changes to marcsj PR
This commit is contained in:
parent
bf2319c80f
commit
ec487ee614
2 changed files with 9 additions and 3 deletions
|
@ -58,9 +58,14 @@ export default class Link {
|
|||
|
||||
let appliedFilters = _.extend({}, filters, searchFilters);
|
||||
|
||||
// I'm sorry.
|
||||
// see https://github.com/cult-of-coders/grapher/issues/134
|
||||
return (linkedCollection.find && linkedCollection.find(appliedFilters, options, userId)) || linkedCollection.default.find(appliedFilters, options, userId);
|
||||
// happens due to recursive importing of modules
|
||||
// TODO: find another way to do this
|
||||
if (linkedCollection.find) {
|
||||
return linkedCollection.find(appliedFilters, options, userId)
|
||||
} else {
|
||||
return linkedCollection.default.find(appliedFilters, options, userId);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -31,7 +31,8 @@ export function createNodes(root) {
|
|||
}
|
||||
|
||||
// workaround, see https://github.com/cult-of-coders/grapher/issues/134
|
||||
if(root.collection.default) {
|
||||
// TODO: find another way to do this
|
||||
if (root.collection.default) {
|
||||
root.collection = root.collection.default;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue