Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nikola Balog
erp5
Commits
a697da76
Commit
a697da76
authored
Dec 26, 2023
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_json_editor: Only return editor.promise is enough to catch errors
parent
255cf060
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
bt5/erp5_json_editor/SkinTemplateItem/portal_skins/erp5_json_editor/json-editor.gadget.js.js
...em/portal_skins/erp5_json_editor/json-editor.gadget.js.js
+2
-10
No files found.
bt5/erp5_json_editor/SkinTemplateItem/portal_skins/erp5_json_editor/json-editor.gadget.js.js
View file @
a697da76
...
@@ -245,19 +245,11 @@
...
@@ -245,19 +245,11 @@
gadget
.
editor
=
editor
;
gadget
.
editor
=
editor
;
gadget
.
editor
.
on
(
'
change
'
,
gadget
.
deferNotifyChangeBinded
.
bind
(
gadget
));
gadget
.
editor
.
on
(
'
change
'
,
gadget
.
deferNotifyChangeBinded
.
bind
(
gadget
));
// return complex object is not possible throught iframe
// editor relies on async load function, so we must return the promise
// it seems to crash rjs somewhere. To check...
// https://lab.nexedi.com/nexedi/renderjs/blob/master/renderjs.js#L2070
//return editor;
// editor relies on async load function, so we need to await the promise
// to finish before continue, otherwise rendering errors wont throw Errors
// to finish before continue, otherwise rendering errors wont throw Errors
// in the same stack as expected.
// in the same stack as expected.
return
editor
.
promise
.
catch
();
return
editor
.
promise
})
})
.
push
(
undefined
,
function
(
err
)
{
throw
new
Error
(
err
);
});
})
})
.
declareMethod
(
'
getContent
'
,
function
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
var
form_data
=
{};
var
form_data
=
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment