1
0
mirror of https://github.com/DataTables/DataTables.git synced 2025-03-15 16:29:16 +01:00

Dev: Stop possible error condition in Syntax highlighter

This commit is contained in:
Allan Jardine 2015-09-18 15:32:30 +01:00
parent 52b30868a1
commit 50d51a90e7
2 changed files with 3 additions and 2 deletions

View File

@ -1 +1 @@
144ff1dd2d137ad52de9871f94b21d7a01775ea9
2f163a0c3228f4ab347a9d14360fa32ebcf92dbf

View File

@ -193,8 +193,9 @@ var sh = {
;
// execute the toolbar command
if (highlighter && commandName && sh.toolbar.items[commandName].execute)
if (highlighter && commandName && sh.toolbar.items[commandName] && sh.toolbar.items[commandName].execute) {
sh.toolbar.items[commandName].execute(highlighter);
}
// disable default A click behaviour
e.preventDefault();