Permalink
Browse files

align defaults, use ? instead of the type assertion, default to null

1 parent f9ea4b6 commit d2146f2731af583119676a3bd697fd7c02a4f64e @attilaolah attilaolah committed Aug 19, 2015
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/wow.coffee
View
@@ -101,18 +101,18 @@ getComputedStyleRX = /(\-([a-z]){1})/g
class @WOW
defaults:
- boxClass: 'wow'
- animateClass: 'animated'
- offset: 0
- mobile: true
- live: true
- callback: null
- scrollContainer: undefined
+ boxClass: 'wow'
+ animateClass: 'animated'
+ offset: 0
+ mobile: true
+ live: true
+ callback: null
+ scrollContainer: null
constructor: (options = {}) ->
@scrolled = true
@config = @util().extend(options, @defaults)
- if typeof options.scrollContainer is 'string'
+ if options.scrollContainer?
@config.scrollContainer = document.querySelector(options.scrollContainer)
# Map of elements to animation names:
@animationNameCache = new WeakMap()

0 comments on commit d2146f2

Please sign in to comment.