beyond-rails 0.0.201 → 0.0.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b9759e033d571fadd60f7ff3a2284398e363f2dfadbb6ab3db54abf8f5863d7a
4
- data.tar.gz: 037e12fb98286c223a7187fba28c8c88172e96a46cce3f5ef0d7537cadefd59c
3
+ metadata.gz: c816a4705572ba5547e235aa306aa86bdb1a378f2e726305bfd72cab13817de1
4
+ data.tar.gz: 6e3ce062286f84b8b390a7a905168a362f6aa2a41ae60aeff0d96d422c104b88
5
5
  SHA512:
6
- metadata.gz: 50b799c4d35bcbf22b8d765cf2c65a3fbd5513cefbd4c0c61106b99821f0e8b21615a7065d6dde23ddeebc30c84cee9e69a03799e52bec7e60f544ce37065ed2
7
- data.tar.gz: 0df9f28b53a6a310d92c7408189261c0b018fbdc62db9f5bfe59eb0f21540603105cbe59059a87177b2efc921d031943964eb8f948e3df298549ef69475aed8c
6
+ metadata.gz: d1f3a3c4252e1a060e277a1adee4b7936f9d0ff4897f5f7cde4839e868b7a08b36a871965ab0fa6bd3b3fde096e562f60440f5b543c0fea7d3b04e59f983af71
7
+ data.tar.gz: fc0200739a4d9eee637fbc3960e0be00a1ecca07d711a83ad54a516c7a19648e4a8feba55a217646b53dd733f5dd03e85b9ced0985aaf43ebca2f664e1fbb21d
@@ -34,8 +34,17 @@ export default class Dropdown {
34
34
  }
35
35
 
36
36
  init() {
37
+
38
+ if (! this.dom) {
39
+ throw new Error('dom is missing in Dropdown class')
40
+ }
41
+
37
42
  this.id = this.dom.dataset.target
38
43
  this.menu = document.querySelector(`[data-dropdown-menu="${this.id}"]`)
44
+
45
+ if (! this.menu) {
46
+ throw new Error(`menu ${this.id} is missing in Dropdown class`)
47
+ }
39
48
  this.place = this.menu.dataset.place || 'bottom'
40
49
  this.align = this.menu.dataset.align
41
50
  this.menu.remove()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.201
4
+ version: 0.0.202
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng