Skip to content

Commit 606bcf7

Browse files
committed
chore: use strict equality
1 parent 7e619e5 commit 606bcf7

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

demos/aurelia/src/examples/slickgrid/example41.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@ export class Example41 {
188188
}
189189

190190
handleOnDragEnd(e: CustomEvent, args: any) {
191-
if (this.dragMode != 'recycle') {
191+
if (this.dragMode !== 'recycle') {
192192
return;
193193
}
194194
this.dragHelper?.remove();
195195
document.querySelector<HTMLDivElement>('#dropzone')?.classList.remove('drag-dropzone', 'drag-hover');
196196

197-
if (this.dragMode != 'recycle' || args.target.id !== 'dropzone') {
197+
if (this.dragMode !== 'recycle' || args.target.id !== 'dropzone') {
198198
return;
199199
}
200200

demos/vanilla/src/examples/example29.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BindingEventService } from '@slickgrid-universal/binding';
2-
import { type Column, Editors, Formatters, type GridOption, SlickGlobalEditorLock } from '@slickgrid-universal/common';
2+
import { type Column, Editors, Formatters, type GridOption, isDefined, SlickGlobalEditorLock } from '@slickgrid-universal/common';
33
import { Slicker, type SlickVanillaGridBundle } from '@slickgrid-universal/vanilla-bundle';
44

55
import { ExampleGridOptions } from './example-grid-options.js';
@@ -230,13 +230,13 @@ export default class Example29 {
230230

231231
handleOnDragEnd(e: CustomEvent) {
232232
const args = e.detail?.args;
233-
if (this.dragMode != 'recycle') {
233+
if (this.dragMode !== 'recycle') {
234234
return;
235235
}
236236
this.dragHelper.remove();
237237
document.querySelector<HTMLDivElement>('#dropzone')?.classList.remove('drag-dropzone', 'drag-hover');
238238

239-
if (this.dragMode != 'recycle' || args.target.id !== 'dropzone') {
239+
if (this.dragMode !== 'recycle' || args.target.id !== 'dropzone') {
240240
return;
241241
}
242242

@@ -251,7 +251,7 @@ export default class Example29 {
251251
}
252252

253253
requiredFieldValidator(value: any) {
254-
if (value == null || value == undefined || !value.length) {
254+
if (isDefined(value)) {
255255
return { valid: false, msg: 'This is a required field' };
256256
} else {
257257
return { valid: true, msg: null };

demos/vue/src/components/Example41.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ function handleOnDrag(e: MouseEvent, args: any) {
183183
}
184184
185185
function handleOnDragEnd(e: CustomEvent, args: any) {
186-
if (dragMode.value != 'recycle') {
186+
if (dragMode.value !== 'recycle') {
187187
return;
188188
}
189189
dragHelper?.remove();
190190
document.querySelector<HTMLDivElement>('#dropzone')?.classList.remove('drag-dropzone', 'drag-hover');
191191
192-
if (dragMode.value != 'recycle' || args.target.id !== 'dropzone') {
192+
if (dragMode.value !== 'recycle' || args.target.id !== 'dropzone') {
193193
return;
194194
}
195195

frameworks/angular-slickgrid/src/demos/examples/example41.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
2-
import { AngularGridInstance, Column, Editors, Formatters, GridOption, SlickGlobalEditorLock } from '../../library';
2+
import { AngularGridInstance, Column, Editors, Formatters, GridOption, isDefined, SlickGlobalEditorLock } from '../../library';
33

44
@Component({
55
templateUrl: './example41.component.html',
@@ -199,13 +199,13 @@ export class Example41Component implements OnInit {
199199
}
200200

201201
handleOnDragEnd(e: CustomEvent, args: any) {
202-
if (this.dragMode != 'recycle') {
202+
if (this.dragMode !== 'recycle') {
203203
return;
204204
}
205205
this.dragHelper?.remove();
206206
document.querySelector<HTMLDivElement>('#dropzone')?.classList.remove('drag-dropzone', 'drag-hover');
207207

208-
if (this.dragMode != 'recycle' || args.target.id !== 'dropzone') {
208+
if (this.dragMode !== 'recycle' || args.target.id !== 'dropzone') {
209209
return;
210210
}
211211

@@ -220,7 +220,7 @@ export class Example41Component implements OnInit {
220220
}
221221

222222
requiredFieldValidator(value: any) {
223-
if (value == null || value == undefined || !value.length) {
223+
if (isDefined(value)) {
224224
return { valid: false, msg: 'This is a required field' };
225225
} else {
226226
return { valid: true, msg: null };

0 commit comments

Comments
 (0)