Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
hoseinzadehashraf committed Apr 17, 2024
1 parent ec5589e commit afe4760
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion dist/bundle-built.js
Original file line number Diff line number Diff line change
Expand Up @@ -37930,7 +37930,9 @@ define('app/masonryGrid',["require", "exports", "jquery"], function (require, ex
initialize() {
try {
this.parent = document.querySelector(this.options.parentSelector);
this.items = this.parent.querySelectorAll(this.options.parentSelector + ' > ' + this.options.itemsSelector);
this.items = !this.parent
? undefined
: this.parent.querySelectorAll(this.options.parentSelector + ' > ' + this.options.itemsSelector);
if (!this.parent || !this.items || !this.items.length)
return;
const dataAttr = this.parent.getAttribute("data-min-column-width");
Expand Down
2 changes: 1 addition & 1 deletion dist/bundle-built.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"url": "git://github.com/Geeksltd/Olive.Microservices.HubJs.git"
},
"author": "Geeks Ltd",
"version": "4.2.61",
"version": "4.2.62",
"license": "GPL-3.0",
"private": false,
"files": [
Expand Down
4 changes: 3 additions & 1 deletion src/masonryGrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ export default class MasonryGrid {
private initialize() {
try {
this.parent = document.querySelector<HTMLElement>(this.options.parentSelector);
this.items = this.parent.querySelectorAll(this.options.parentSelector + ' > ' + this.options.itemsSelector);
this.items = !this.parent
? undefined
: this.parent.querySelectorAll(this.options.parentSelector + ' > ' + this.options.itemsSelector);

if (!this.parent || !this.items || !this.items.length) return;

Expand Down

0 comments on commit afe4760

Please sign in to comment.