mirror of
https://github.com/ONLYOFFICE/server.git
synced 2026-02-10 18:05:07 +08:00
[spell] Removed redundant
Removed redundant JSON.stringify in spellCheckData
This commit is contained in:
@ -103,7 +103,7 @@ exports.install = function (server, callbackFunction) {
|
|||||||
try {
|
try {
|
||||||
let data = JSON.parse(message);
|
let data = JSON.parse(message);
|
||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case 'spellCheck': spellCheck(conn, data);break;
|
case 'spellCheck': spellCheck(conn, data.spellCheckData);break;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logger.error("error receiving response: %s", e);
|
logger.error("error receiving response: %s", e);
|
||||||
@ -125,8 +125,6 @@ exports.install = function (server, callbackFunction) {
|
|||||||
|
|
||||||
function spellCheck(conn, data) {
|
function spellCheck(conn, data) {
|
||||||
return co(function*() {
|
return co(function*() {
|
||||||
data = JSON.parse(data.spellCheckData);
|
|
||||||
|
|
||||||
let promises = [];
|
let promises = [];
|
||||||
for (let i = 0, length = data.usrWords.length; i < length; ++i) {
|
for (let i = 0, length = data.usrWords.length; i < length; ++i) {
|
||||||
promises.push(spell(data.type, data.usrWords[i], data.usrLang[i]));
|
promises.push(spell(data.type, data.usrWords[i], data.usrLang[i]));
|
||||||
|
|||||||
Reference in New Issue
Block a user