Skip to content

Commit

Permalink
size() is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
uchks committed Oct 6, 2024
1 parent 806280d commit 7a84ebc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions depictions/web/js/content-blocks-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function getContentBlocks() {
source: "package>screenshots>screenshot",
render: (element, source) => {
$("#screenshotsLink").remove();
if ($(source).size() === 0) {
if ($(source).length === 0) {
return;
}
// create screenshots link
Expand All @@ -79,7 +79,7 @@ function getContentBlocks() {
source: "package>changelog>change",
render: (element, source) => {
$("#changelogLink").remove();
if ($(source).size() === 0) {
if ($(source).length === 0) {
return;
}
// create changelog link
Expand All @@ -103,7 +103,7 @@ function getContentBlocks() {
source: "package>links>link",
paragraphElement: "<li class='list-group-item'>",
render: (element, source) => {
if ($(source).size() === 0) {
if ($(source).lenght === 0) {
$("#externalLinksContainer").remove();
}

Expand Down
2 changes: 1 addition & 1 deletion depictions/web/js/content-blocks-screenshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function getContentBlocks() {
type: "custom",
source: "package>screenshots>screenshot",
render: (element, source) => {
if ($(source).size() === 0) {
if ($(source).length === 0) {
$(element).append(
$(
"<div class='alert alert-danger'>The aren't any screenshots for this package</div>"
Expand Down

0 comments on commit 7a84ebc

Please sign in to comment.