Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix name of method this.destory() in this.destroy() #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23,244 changes: 23,244 additions & 0 deletions example/package-lock.json

Large diffs are not rendered by default.

14,098 changes: 7,515 additions & 6,583 deletions example/yarn.lock

Large diffs are not rendered by default.

3,545 changes: 3,545 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/OwlCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class ReactOwlCarousel extends Component<OwlCarouselProps> {
}

public UNSAFE_componentWillReceiveProps() {
this.destory();
this.destroy();
}

public componentDidUpdate() {
Expand Down Expand Up @@ -77,7 +77,7 @@ export default class ReactOwlCarousel extends Component<OwlCarouselProps> {
this.$ele.owlCarousel(options || this.options);
}

public destory() {
public destroy() {
if (!this.$ele) throw new Error('OwlCarousel is not created');

this.$ele.trigger('destroy.owl.carousel');
Expand Down
2 changes: 1 addition & 1 deletion umd/OwlCarousel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class ReactOwlCarousel extends Component<OwlCarouselProps> {
prev(speed: number | number[]): void;
to(position: number, speed: number): void;
create(options?: Options): void;
destory(): void;
destroy(): void;
play(timeout: number, speed: number): void;
stop(): void;
render(): JSX.Element;
Expand Down
4 changes: 2 additions & 2 deletions umd/OwlCarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3427,7 +3427,7 @@
this.create();
};
ReactOwlCarousel.prototype.UNSAFE_componentWillReceiveProps = function () {
this.destory();
this.destroy();
};
ReactOwlCarousel.prototype.componentDidUpdate = function () {
var _a = filterOptions(this.props), options = _a[0], propsWithoutOptions = _a[1];
Expand Down Expand Up @@ -3470,7 +3470,7 @@
throw new Error('OwlCarousel is not created');
this.$ele.owlCarousel(options || this.options);
};
ReactOwlCarousel.prototype.destory = function () {
ReactOwlCarousel.prototype.destroy = function () {
if (!this.$ele)
throw new Error('OwlCarousel is not created');
this.$ele.trigger('destroy.owl.carousel');
Expand Down
2 changes: 1 addition & 1 deletion umd/OwlCarousel.min.js

Large diffs are not rendered by default.

Loading