We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
To fix, make sure that Entry#fields always at least returns an empty hash.
Entry#fields
[32] pry(main)> client.entries('sys.id' => 'no-ne-NP', locale: 'ne-NP') => #<Contentful::Array:0x3ff3558c2610> [33] pry(main)> client.entries('sys.id' => 'no-ne-NP', locale: 'ne-NP').first => #<Contentful::DynamicEntry[sampleType]:0x3ff35729dabc> [34] pry(main)> client.entries('sys.id' => 'no-ne-NP', locale: 'ne-NP').first.fields => nil [35] pry(main)> client.entries('sys.id' => 'no-ne-NP', locale: 'ne-NP').first.instance_variable_get(:@fields) => {} [36] pry(main)> client.entries('sys.id' => 'no-ne-NP', locale: 'ne-NP').first.title NoMethodError: undefined method `[]' for nil:NilClass from /Users/davemac/dev/contentful/api_clients/ruby/delivery.rb/lib/contentful/dynamic_entry.rb:36:in `block (3 levels) in create' [37] pry(main)> client.entries('sys.id' => 'no-ne-NP', locale: 'ne-NP').first.respond_to?(:title) => true
The text was updated successfully, but these errors were encountered:
dlitvakb
No branches or pull requests
To fix, make sure that
Entry#fields
always at least returns an empty hash.The text was updated successfully, but these errors were encountered: