Skip to content

Commit 4ff3f66

Browse files
committed
fixed JSON.parse
1 parent cfb2009 commit 4ff3f66

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

draceditor/__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.1.1'
3+
__VERSION__ = '1.1.2'
44
__AUTHOR__ = 'Agus Makmun (Summon Agus)'
55
__AUTHOR_EMAIL__ = '[email protected]'

draceditor/static/js/draceditor.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Name : DracEditor v1.1.1
2+
* Name : DracEditor v1.1.2
33
* Created by : Agus Makmun (Summon Agus)
44
* Release date : 5-Jan-2017
55
* Official : https://dracos-linux.org
@@ -132,7 +132,8 @@
132132
}
133133
}
134134
// Set autocomplete for ace editor
135-
if (draceditor.data('enable-configs').mention === 'true') {
135+
var configs = JSON.parse(draceditor.data('enable-configs').replace(/'/g, '"'));
136+
if (configs.mention === 'true') {
136137
editor.completers = [emojiWordCompleter, mentionWordCompleter]
137138
}else {
138139
editor.completers = [emojiWordCompleter]

0 commit comments

Comments
 (0)