Skip to content

Commit 87da32a

Browse files
committed
fixed error message imgur invalid client_id
1 parent a691099 commit 87da32a

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

martor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
22

3-
__VERSION__ = '1.3.6'
3+
__VERSION__ = '1.3.7'
44
__AUTHOR__ = 'Agus Makmun (Summon Agus)'
55
__AUTHOR_EMAIL__ = '[email protected]'

martor/static/martor/css/martor.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

martor/static/martor/js/martor.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
2-
* Name : Martor v1.3.6
2+
* Name : Martor v1.3.7
33
* Created by : Agus Makmun (Summon Agus)
4-
* Release date : 09-Feb-2019
4+
* Release date : 10-Feb-2019
55
* License : GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
66
* Repository : https://github.com/agusmakmun/django-markdown-editor
77
**/
@@ -63,7 +63,7 @@
6363

6464
var emojiWordCompleter = {
6565
getCompletions: function(editor, session, pos, prefix, callback) {
66-
var wordList = emojis; // from `atwho/emojis.min.js`
66+
var wordList = typeof(emojis) != "undefined" ? emojis : []; // from `atwho/emojis.min.js`
6767
var obj = editor.getSession().getTokenAt(pos.row, pos.column.count);
6868
var curTokens = obj.value.split(/\s+/);
6969
var lastToken = curTokens[curTokens.length-1];
@@ -537,11 +537,8 @@
537537
editor=editor,
538538
imageData={name: response.name, link: response.link}
539539
);
540-
}else if (response.status == 403) {
541-
alert(response.data.error); // invalid client id
542-
}
543-
else {
544-
console.log(response)
540+
}else {
541+
alert(response.error);
545542
}
546543
},
547544
error: function(response) {
@@ -804,7 +801,7 @@
804801
// markdown insert emoji from the modal
805802
$('.markdown-emoji[data-field-name='+field_name+']').click(function(){
806803
var modalEmoji = $('.modal-emoji[data-field-name='+field_name+']');
807-
var emojiList = emojis; // from `plugins/js/emojis.min.js`
804+
var emojiList = typeof(emojis) != "undefined" ? emojis : []; // from `plugins/js/emojis.min.js`
808805
var segmentEmoji = modalEmoji.find('.emoji-content-body');
809806
var loaderInit = modalEmoji.find('.emoji-loader-init');
810807

0 commit comments

Comments
 (0)