Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when entry reference is not published #5

Closed
kretzm opened this issue Oct 17, 2018 · 1 comment
Closed

Error when entry reference is not published #5

kretzm opened this issue Oct 17, 2018 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@kretzm
Copy link
Collaborator

kretzm commented Oct 17, 2018

Issue

When a published entry has a reference that is unpublished, we are getting an error thrown back to us.
'TypeError: Cannot read property \'_deferred\' of undefined', 'at Contentfully._dereferenceLink (.../contentfully/dist/Contentfully.js:94:18)'

This is using the Delivery API, we haven't tested if the issue is the same in the preview API

Offending function:

private _dereferenceLink(reference: any, links: any) {

Expected

Ideally, if a reference is unpublished, we shouldn't get an error. Only return references that are published and ignore unpublished references. As a content editor, if I leave something in draft mode, I wouldn't want to see it on my published page.

@bernietrinh bernietrinh added the bug Something isn't working label Oct 18, 2018
@bernietrinh
Copy link
Collaborator

@kretzm this is fixed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants