Permalink
Browse files

Changed all boolean casts that were using Boolean() function to use d…

  • Loading branch information...
psmolenski committed Aug 1, 2013
1 parent 2930029 commit 9c2915d97227e181fa86d9defa11c0d923ab58ea
@@ -9,7 +9,7 @@
function init() {
var instance = this;
- var pluginEnabled = Boolean(instance.getSettings().removeRowPlugin);
+ var pluginEnabled = !!(instance.getSettings().removeRowPlugin);
if (pluginEnabled) {
bindMouseEvents();
@@ -12,7 +12,7 @@ function HandsontableColumnSorting() {
var sortingSettings = instance.getSettings().columnSorting;
var sortingColumn, sortingOrder;
- sortingEnabled = Boolean(sortingSettings);
+ sortingEnabled = !!(sortingSettings);
if (sortingEnabled) {
instance.sortIndex = [];
@@ -1,7 +1,7 @@
(function(Handsontable){
function init(){
var instance = this;
- var pluginEnabled = Boolean(instance.getSettings().contextMenu);
+ var pluginEnabled = !!(instance.getSettings().contextMenu);
if(pluginEnabled){
createContextMenu.call(instance);
@@ -103,7 +103,7 @@ function HandsontableManualColumnMove() {
this.init = function (source) {
var instance = this;
- var manualColMoveEnabled = Boolean(this.getSettings().manualColumnMove);
+ var manualColMoveEnabled = !!(this.getSettings().manualColumnMove);
if (manualColMoveEnabled) {
var initialManualColumnPositions = this.getSettings().manualColumnMove;
@@ -132,7 +132,7 @@ function HandsontableManualColumnResize() {
this.init = function (source) {
var instance = this;
- var manualColumnWidthEnabled = Boolean(this.getSettings().manualColumnResize);
+ var manualColumnWidthEnabled = !!(this.getSettings().manualColumnResize);
if (manualColumnWidthEnabled) {
var initialColumnWidths = this.getSettings().manualColumnResize;
@@ -69,7 +69,7 @@ function Storage(prefix) {
var instance = this,
pluginSettings = instance.getSettings()['persistentState'];
- plugin.enabled = Boolean(pluginSettings);
+ plugin.enabled = !!(pluginSettings);
if (!plugin.enabled) {
removeHooks.call(instance);

0 comments on commit 9c2915d

Please sign in to comment.