Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Changed ElementApiMixin#loadDataFromElement to return action result.
Browse files Browse the repository at this point in the history
  • Loading branch information
oskarwrobel committed Mar 3, 2018
1 parent 851dc7d commit 730cb44
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/editor/utils/elementapimixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const ElementApiMixin = {
* @inheritDoc
*/
loadDataFromElement() {
this.data.set( getDataFromElement( this.element ) );
return this.data.set( getDataFromElement( this.element ) );
}
};

Expand Down Expand Up @@ -57,4 +57,6 @@ export default ElementApiMixin;
* Loads the data from the {@link #element editor element} to the main root.
*
* @method #loadDataFromElement
* @returns {*} Result of setting data. Note that {module:engine/controller/datacontroller~DataController#set}
* returns void but this method can be decorated and e.g. return promise.
*/

0 comments on commit 730cb44

Please sign in to comment.