volt 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d96efb29b1e1d0826494bcf23a94019895b00912
4
- data.tar.gz: f5d7cc84d1bb843acce90b6615d8cbad4d9d1e8c
3
+ metadata.gz: 10cc84012e873b87e79b5cd770e387ab1c292b03
4
+ data.tar.gz: 2ba97e0d7442c60768ba4ceacf5c9ca13d96db6f
5
5
  SHA512:
6
- metadata.gz: 6277e64d2d6f86d104b59970452749fc7ac00ebf35cac49f4c332e97d8a374e19e77cfdd004f0539c7988205389cc55bb62268989c53aee64d33080e5d2515df
7
- data.tar.gz: 167c0616fb8a2927f51e66039df1b13a94069ce2c47db089d032215f4fd2458bd5d54f101d6fda109d1cfeb581c6886f3b4f01a47fb3736e7b70f2b1da27572d
6
+ metadata.gz: 5cf7ccd40cea80341c5138c59a7d8057143478f8ebbf6148fd3a2f050e1088fa6a94cf8a5591f9de93f848884d9ec50ef84ebb7031936a634583b6e3b357e686
7
+ data.tar.gz: a28b2acab7c75e6fb85e48ee54c5c1ebc29a0851bd8d31e9badde216be6b23c820900fdca47c58a4ca9d476ed0aedc39f1ce83bfa07a984ad0b06435bad78266
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.9
1
+ 0.4.0
@@ -11,7 +11,9 @@ class ContentBinding < BaseBinding
11
11
  # Run the initial render
12
12
  update
13
13
 
14
- @changed_listener = @value.on('changed') { update }
14
+ if @value.reactive?
15
+ @changed_listener = @value.on('changed') { update }
16
+ end
15
17
  end
16
18
 
17
19
  def update
@@ -25,8 +27,10 @@ class ContentBinding < BaseBinding
25
27
  end
26
28
 
27
29
  def remove
28
- @changed_listener.remove
29
- @changed_listener = nil
30
+ if @changed_listener
31
+ @changed_listener.remove
32
+ @changed_listener = nil
33
+ end
30
34
 
31
35
  super
32
36
  end
@@ -131,7 +131,7 @@ class TemplateBinding < BaseBinding
131
131
  controller = get_controller(controller_name)
132
132
 
133
133
  # Initialize the new controller
134
- current_context = (ModelController || controller).new(*args)
134
+ current_context = (controller || ModelController).new(*args)
135
135
  elsif @model
136
136
  # Passed in attributes, but there is no controller
137
137
  current_context = SubContext.new(@model, current_context)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout