Permalink
Browse files

Avoid weird behavior if layer is passed to showPrevious

  • Loading branch information...
koenbok committed Dec 1, 2016
1 parent e10cdbb commit 239131b10b6e8e00218c7b28b840eaf3e006a8ec
Showing with 4 additions and 0 deletions.
  1. +4 −0 framer/Components/FlowComponent.coffee
@@ -177,6 +177,10 @@ class exports.FlowComponent extends Layer
showPrevious: (options={}) =>
return unless @previous
return if @isTransitioning
+
+ # Maybe people (Jorn) pass in a layer accidentally
+ options = {} if options instanceof(Framer.Layer)
+
options = _.defaults({}, options, {count: 1, animate: true})
if options.count > 1

0 comments on commit 239131b

Please sign in to comment.