Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 21edc76

Browse files
author
steven.roulleau
committed
fix(Editor): bad request on empty resize + previous results not erased on language change
MSIS-2653
1 parent 4d7b2d4 commit 21edc76

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/v4/rest/rest_text_iink.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
const configuration = editorElement.editor.configuration;
8080
//The path to the language depend of the version of API you are using.
8181
configuration.recognitionParams.iink.lang = e.target.value;
82+
resultElement.innerHTML = '';
8283
});
8384

8485
undoElement.addEventListener('click', () => {

src/recognizer/rest/iinkRestRecognizer.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,5 +217,7 @@ export function convert (recognizerContext, model) {
217217
* @param {Model} model Current model
218218
*/
219219
export function resize (recognizerContext, model) {
220-
export_(recognizerContext, model)
220+
if (model.strokeGroups.length) {
221+
export_(recognizerContext, model)
222+
}
221223
}

0 commit comments

Comments
 (0)