Skip to content

Commit

Permalink
Structure constructor conditional is now falsy
Browse files Browse the repository at this point in the history
  • Loading branch information
md-y committed Jan 9, 2022
1 parent 68409f6 commit c007772
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/structure/author.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Author {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down
2 changes: 1 addition & 1 deletion src/structure/chapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Chapter {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down
2 changes: 1 addition & 1 deletion src/structure/cover.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Cover {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down
2 changes: 1 addition & 1 deletion src/structure/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Group {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down
2 changes: 1 addition & 1 deletion src/structure/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class List {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down
2 changes: 1 addition & 1 deletion src/structure/manga.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Manga {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down
2 changes: 1 addition & 1 deletion src/structure/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class User {
return;
} else if (!context) return;

if (context.data === undefined) context.data = {};
if (!context.data) context.data = {};

/**
* Mangadex id for this object
Expand Down

0 comments on commit c007772

Please sign in to comment.