twine-rails 0.1.2 → 0.1.3

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: a6d017ab011952267836b83fb7ce92d6f899b956
4
- data.tar.gz: efb0d4ec2831fb6e29191c78739189a630826107
3
+ metadata.gz: 2ddc2b0e558e86d41b9a5826a676b7f787e8716a
4
+ data.tar.gz: 86d5ab892a32b9302323cc2932f0f61c11999e98
5
5
  SHA512:
6
- metadata.gz: 9b73dac0813036283699cde20ed529bc70d2cd645594acbce468522cca55031de164fa7e6cfea0bf311dfd43940aeb277a2a37066780f6784b1383d8978b903c
7
- data.tar.gz: 0210493867dada6123415e4e00ad08b56156234e18bd9156e439f2cad8ebbc9f2e66672138e67f01bfd09636e1a954104951e0017e07e6e01a779064e007c9fe
6
+ metadata.gz: 4b5fd19805c7616bdab5c0e97f09348e5e10a0ea525193cf5fcceea89398bc66596d0cff836d6c20a4afe3191cc1b70e821080d89f6ef72bb0530deef076eea4
7
+ data.tar.gz: 37e98561a3c75913471c3434d64ebfaf619156f582640e3ee28f609c0be12e20ca514b06b74f7519647548cf3a1b1542c2cfb3827bd7091c3b9444d13299beb8
data/README.md CHANGED
@@ -31,9 +31,9 @@ Twine can be initialized simply with the following:
31
31
 
32
32
  ```html
33
33
  <script type="text/javascript">
34
- context = {}
34
+ var context = {};
35
35
  $(function() {
36
- Twine.reset(context).bind().refresh()
36
+ Twine.reset(context).bind().refresh();
37
37
  });
38
38
  </script>
39
39
  ```
@@ -120,6 +120,9 @@ getContext = (node, child) ->
120
120
  while node
121
121
  return rootContext if node == rootNode
122
122
  node = node.parentNode if !child
123
+ if !node
124
+ console.warn "Unable to find context; please check that the node is attached to the DOM that Twine has bound, or that bindings have been initiated on this node's DOM"
125
+ return null
123
126
  if (id = node.bindingId) && (context = elements[id]?.childContext)
124
127
  return context
125
128
  node = node.parentNode if child
@@ -1,3 +1,3 @@
1
1
  module TwineRails
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Li
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-19 00:00:00.000000000 Z
13
+ date: 2015-11-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: coffee-rails