Skip to content

Commit

Permalink
fix: check for undefined and null
Browse files Browse the repository at this point in the history
the GraphQL API returns `null` in `_editable` if content-version is set to "published", therefore the check fails.
  • Loading branch information
derz committed May 28, 2020
1 parent 65e8afa commit cfd7d14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storyblok-vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

Vue.directive('editable', {
bind: function(el, binding) {
if (typeof binding.value._editable === 'undefined') {
if (typeof binding.value._editable === 'undefined' || binding.value._editable === null) {
return
}

Expand Down

0 comments on commit cfd7d14

Please sign in to comment.