We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 020b47f commit e7e99f7Copy full SHA for e7e99f7
src/legacy/api/CommandAPI.cpp
@@ -196,7 +196,9 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
196
for (auto msg : output.getMessages()) {
197
outputStr = outputStr.append(I18n::get(msg.getMessageId(), msg.getParams())).append("\n");
198
}
199
- outputStr.erase(outputStr.size() - 1, 1);
+ if (output.getMessages().size()) {
200
+ outputStr.pop_back();
201
+ }
202
Local<Object> resObj = Object::newObject();
203
resObj.set("success", output.getSuccessCount() ? true : false);
204
resObj.set("output", outputStr);
0 commit comments