Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gutenberg-3348015
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
gutenberg-3348015
Commits
50766276
Commit
50766276
authored
5 years ago
by
Marco Fernandes
Browse files
Options
Downloads
Patches
Plain Diff
Fix block resolver.
parent
dfdbc8e2
No related branches found
Branches containing commit
Tags
10.1.10
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
js/drupal-store.es6.js
+5
-21
5 additions, 21 deletions
js/drupal-store.es6.js
js/drupal-store.js
+5
-1
5 additions, 1 deletion
js/drupal-store.js
with
10 additions
and
22 deletions
js/drupal-store.es6.js
+
5
−
21
View file @
50766276
...
...
@@ -49,28 +49,12 @@
`
);
const
block
=
await
response
.
json
();
dispatch
(
'
drupal
'
).
setBlock
(
item
,
block
);
return
block
;
return
{
type
:
'
GET_BLOCK
'
,
item
,
block
,
};
},
// getBlock(item) {
// return new Promise((resolve, reject) => {
// fetch(`${drupalSettings.path.baseUrl}editor/blocks/load/${item}`)
// .then(response => {
// response
// .json()
// .then(block => {
// console.log(item, block);
// dispatch('drupal').setBlock(item, block);
// resolve(block);
// })
// .catch(err => {
// reject(err);
// });
// })
// .catch(err => {
// reject(err);
// });
// });
// },
},
});
}
...
...
This diff is collapsed.
Click to expand it.
js/drupal-store.js
+
5
−
1
View file @
50766276
...
...
@@ -79,7 +79,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
block
=
_context
.
sent
;
dispatch
(
'
drupal
'
).
setBlock
(
item
,
block
);
return
_context
.
abrupt
(
'
return
'
,
block
);
return
_context
.
abrupt
(
'
return
'
,
{
type
:
'
GET_BLOCK
'
,
item
:
item
,
block
:
block
});
case
8
:
case
'
end
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment