Skip to content

Commit

Permalink
v2.2.1: fix changing active item when current item still loading
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubkowalczyk-pl committed Jul 26, 2019
1 parent 33c9666 commit aaf037f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jgallery",
"version": "2.2.0",
"version": "2.2.1",
"description": "JGallery",
"main": "dist/js/jgallery.js",
"types": "types/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/preview/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ export default class Preview extends Component {
setItem(item: AlbumItem) {
this.moveDistance = new Point;

const { element, title } = this;
const { element, content, title } = this;

this.content && this.element.removeChild(this.content);
content && content.parentElement === element && element.removeChild(content);
this.content = createElement(
item.element ?
item.element.outerHTML :
Expand Down

0 comments on commit aaf037f

Please sign in to comment.