Skip to content

Commit

Permalink
fix erroneous warning (google#1791)
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish authored Dec 29, 2020
1 parent bbce31b commit e64d535
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/model-viewer/src/three-components/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ export default class Model extends Object3D {
* to playing the first animation.
*/
playAnimation(name: string|null = null, crossfadeTime: number = 0) {
if (this.currentGLTF == null) {
return;
}
const {animations} = this;
if (animations == null || animations.length === 0) {
console.warn(
Expand Down

0 comments on commit e64d535

Please sign in to comment.