Skip to content

Commit

Permalink
Assert in the event that a non-POPAnimation instance is provided to a…
Browse files Browse the repository at this point in the history
…dd(plan:).

Summary:
The POPAnimationPerformer presently only supports plans of the type POPAnimation. If a new plan type is mapped to this performer then the performer will now fail loudly as a reminder to handle this new type.

Closes #8

Reviewers: O4 Material Motion Apple platform reviewers, O2 Material Motion, markwei

Reviewed By: O4 Material Motion Apple platform reviewers, O2 Material Motion, markwei

Tags: #material_motion

Differential Revision: http://codereview.cc/D1583
  • Loading branch information
jverkoey committed Sep 10, 2016
1 parent bd34623 commit ee844f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PopMotionFamily.swift
Expand Up @@ -48,7 +48,7 @@ extension POPAnimation: Plan {
}

func add(plan: Plan) {
guard let animation = plan as? POPAnimation else { return }
let animation = plan as! POPAnimation
guard let token = self.willStart() else { return }

tokens[animation] = token
Expand Down

0 comments on commit ee844f2

Please sign in to comment.