From e741ceea7f660e50c3a96b4d21d897c1908a6911 Mon Sep 17 00:00:00 2001 From: Alain Dumesny Date: Mon, 9 Mar 2020 10:44:48 -0700 Subject: [PATCH] fix obsoleteAttr() issue --- Gruntfile.js | 2 +- src/gridstack-extra.scss | 2 +- src/utils.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 4c56e9c3b..f63dd0319 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -44,9 +44,9 @@ module.exports = function(grunt) { 'dist/gridstack-poly.js': ['src/gridstack-poly.js'], 'dist/jquery.js': ['src/jquery.js'], 'dist/jquery-ui.js': ['src/jquery-ui.js'], +*/ 'dist/src/gridstack.scss': ['src/gridstack.scss'], 'dist/src/gridstack-extra.scss': ['src/gridstack-extra.scss'], -*/ } } }, diff --git a/src/gridstack-extra.scss b/src/gridstack-extra.scss index 6fe02327d..b0c962843 100644 --- a/src/gridstack-extra.scss +++ b/src/gridstack-extra.scss @@ -6,8 +6,8 @@ */ // default to generate [2-11] columns as 1 (oneColumnMode) and 12 (default) are in the main css -$gridstack-columns: 11 !default; $gridstack-columns-start: 2 !default; +$gridstack-columns: 11 !default; @mixin grid-stack-items($columns) { .grid-stack.grid-stack-#{$columns} { diff --git a/src/utils.ts b/src/utils.ts index 22aba9baf..2ea0300f1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -38,7 +38,7 @@ export function obsoleteOptsDel(opts: GridstackOptions, oldName: string, rev: st /** checks for obsolete Jquery element attributes */ export function obsoleteAttr(el: HTMLElement, oldName: string, newName: string, rev: string) { const oldAttr = el.getAttribute(oldName); - if (oldAttr !== undefined) { + if (oldAttr !== null) { el.setAttribute(newName, oldAttr); console.warn('gridstack.js: attribute `' + oldName + '`=' + oldAttr + ' is deprecated on this object in ' + rev + ' and has been replaced with `' + newName + '`. It will be **completely** removed in v1.0');