From 50d51a90e7c718ce9701a921393cf9c53f3fbe8d Mon Sep 17 00:00:00 2001 From: Allan Jardine Date: Fri, 18 Sep 2015 15:32:30 +0100 Subject: [PATCH] Dev: Stop possible error condition in Syntax highlighter --- .datatables-commit-sync | 2 +- examples/resources/syntax/shCore.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.datatables-commit-sync b/.datatables-commit-sync index 0860c57f..cee2b7bd 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -144ff1dd2d137ad52de9871f94b21d7a01775ea9 +2f163a0c3228f4ab347a9d14360fa32ebcf92dbf diff --git a/examples/resources/syntax/shCore.js b/examples/resources/syntax/shCore.js index 6f8c5a22..8731a6aa 100644 --- a/examples/resources/syntax/shCore.js +++ b/examples/resources/syntax/shCore.js @@ -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();