Skip to content

Commit eb32e7d

Browse files
committed
fix #22 cannot read length of null
1 parent bd9215e commit eb32e7d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-markdown-editor-ghiscoding",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"author": "Ghislain B.",
55
"description": "Angular Markdown Editor, all-in-one Markdown Editor and Preview",
66
"main": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-markdown-editor",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"author": "Ghislain B.",
55
"description": "Angular Markdown Editor, all-in-one Markdown Editor and Preview",
66
"main": "app.js",

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Angular Markdown Editor (Directive)
2-
`1.1.1`
2+
`1.1.2`
33

44
## What do we have?
55
In this package we will use a few libraries and tools to make a more convenient "all in one" WYSIWYG Markdown Editor with preview. All of that with a simple AngularJS Directive call. I plan to use this mainly for online documentation but it could be useful for many other reasons (docs, blog, etc...).

src/angular-markdown-editor.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ angular
2424
language: options.language || 'en',
2525
footer: options.footer || '',
2626
fullscreen: options.fullscreen || { enable: true, icons: {}},
27-
hiddenButtons: options.hiddenButtons || null,
28-
disabledButtons: options.disabledButtons || null,
27+
hiddenButtons: options.hiddenButtons || {},
28+
disabledButtons: options.disabledButtons || {},
2929
initialstate: options.initialstate || 'editor',
3030
parser: options.parser || null,
31-
dropZoneOptions: options.dropZoneOptions || null,
31+
dropZoneOptions: options.dropZoneOptions || {},
3232
enableDropDataUri: options.enableDropDataUri || false,
33-
showButtons: options.showButtons || null,
33+
showButtons: options.showButtons || {},
3434
additionalButtons: options.additionalButtons || (options.addExtraButtons ? addNewButtons() : []),
3535

3636
//-- Events/Hooks --
@@ -160,7 +160,7 @@ function runScopeFunction(scope, fnString, editorObject) {
160160
// if yes then run it through $eval else find it in the scope and then run it. That is the only way to evaluate all arguments of the function
161161
// we'll have to make the object available in the scope so that we can evaluate it inside the controller
162162
var lastParenthese = fnString.indexOf(")");
163-
scope.$markdownEditorObject = editorObject;
163+
scope.$markdownEditorObject = editorObject;
164164
fnString = fnString.replace(")", "$markdownEditorObject)");
165165
result = scope.$eval(fnString);
166166
} else {

0 commit comments

Comments
 (0)