Skip to content

Commit 9ba892b

Browse files
committed
force typescript 3.6 as 3.7 has breaking change
* force Typescript 3.6.5 as >3.7 has getter breaking change forcing all users of this lib to be >3.7 to compile. * they should have made this a 4.x thing see microsoft/TypeScript#33939 otherwise you get: error TS1086: An accessor cannot be declared in an ambient context.
1 parent b14ee4b commit 9ba892b

File tree

3 files changed

+205
-187
lines changed

3 files changed

+205
-187
lines changed

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"core-js": "^3.6.4",
5555
"coveralls": "^3.0.9",
5656
"doctoc": "^1.4.0",
57-
"eslint": "^7.12.1",
57+
"eslint": "^7.14",
5858
"grunt": "^1.0.4",
5959
"grunt-cli": "^1.3.2",
6060
"grunt-contrib-connect": "^3.0.0",
@@ -67,16 +67,17 @@
6767
"grunt-protractor-webdriver": "^0.2.5",
6868
"grunt-sass": "3.1.0",
6969
"jasmine-core": "^3.5.0",
70-
"karma": "^5.2.3",
70+
"karma": "^4",
7171
"karma-chrome-launcher": "^3.1.0",
7272
"karma-cli": "^2.0.0",
7373
"karma-jasmine": "^4.0.1",
7474
"karma-typescript": "4.1.1",
7575
"node-sass": "^5.0.0",
76+
"protractor": "^7.0.0",
7677
"puppeteer": "^5.4.1",
7778
"serve-static": "^1.14.1",
7879
"ts-loader": "^8.0.7",
79-
"typescript": "^4.0.5",
80+
"typescript": "3.6.5",
8081
"webpack": "^5.3.2",
8182
"webpack-cli": "^4.1.0"
8283
}

src/h5/dd-draggable.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,8 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
246246
/** @internal */
247247
private _removeHelperStyle(): DDDraggable {
248248
// don't bother restoring styles if we're gonna remove anyway...
249-
if (! (this.helper as GridItemHTMLElement)?.gridstackNode?._isAboutToRemove) {
249+
let node = this.helper ? (this.helper as GridItemHTMLElement).gridstackNode : undefined;
250+
if (!node || !node._isAboutToRemove) {
250251
DDDraggable.originStyleProp.forEach(prop => {
251252
this.helper.style[prop] = this.dragElementOriginStyle[prop] || null;
252253
});

0 commit comments

Comments
 (0)