We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86d76cf commit bec1763Copy full SHA for bec1763
static/js/blog.js
@@ -53,10 +53,9 @@ $(function () {
53
shade: [0.1, '#fff'] // 0.1 透明度的白色背景
54
});
55
} else if ($state === "success") {
56
- // if ($res.errcode === 0) {
57
- // var value = '';
58
- if ($res[0].errcode === 0) {
59
- var value = '';
+ var $data = $res instanceof Array ? $res[0] : $res;
+ if ($data.errcode === 0) {
+ var value = '';
60
window.editor.insertValue(value);
61
}
62
@@ -168,4 +167,4 @@ $(function () {
168
167
169
$("#documentTemplateModal").modal('hide');
170
171
-});
+});
0 commit comments