snabberb 1.5.2 → 1.5.3

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: 1df088184f2da634a92a5bb64e9e0ca49f350e53e2e03af54517dcf0127b8938
4
- data.tar.gz: e77b22595da1a2c7aa22f310572344fccf8015b669a88c616fc5c86d8ef4fe05
3
+ metadata.gz: f38390a4e8170ba5a8c56f1e9a56921bfbbb36fb00bdb2fdc64bb0a63641a2f2
4
+ data.tar.gz: a3adf4616c7edfea08d48ee11430d84593fc2e1a49a310012f1b76c4698d8ccf
5
5
  SHA512:
6
- metadata.gz: 82348b9d8daf6ddc9104eeec5d0de52e62629d3b1a6ed5c816a9771151a5b38ff54a91ae13c9977621db5381e9808d24a64e49a98a246ed3cfe4fefaf563ad01
7
- data.tar.gz: 882c697ab547a00305ffc802c29171742a2fe30c1292f7355f43668fef123ebb00069db6d2aef19cfd45c0b5f513e419adb8407d534f9dd9ffdce2c981a566c8
6
+ metadata.gz: af9ad4190e3db0cc068a82880490272ae17afd5c96f63603130ffa83992c444751ab65075ea8f2a7ca36ac726cb9e35ea710f6cd4ce92628392304ce6a5ea587
7
+ data.tar.gz: 7c8fddea39a0d9566acc779c2023ea12d2d79adc96d2bb6d40f5cab2b3f8c807ee1d5e24e4c22b7f2b30387e92829d70d5fccb73215026d83a710bd9ee95c176
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Snabberb
4
- VERSION = '1.5.2'
4
+ VERSION = '1.5.3'
5
5
  end
@@ -173,7 +173,6 @@ module Snabberb
173
173
  props_is_hash = props.is_a?(Hash)
174
174
  children = props if !children && !props_is_hash
175
175
  props = {} unless props_is_hash
176
- children = children.to_n if children.is_a?(String)
177
176
  `snabbdom.h(#{element}, #{Native.convert(props)}, #{children})`
178
177
  end
179
178
  end
@@ -74,7 +74,7 @@ function h(sel, b, c) {
74
74
  if (is.array(c)) {
75
75
  children = c;
76
76
  } else if (is.primitive(c)) {
77
- text = c;
77
+ text = c.toString();
78
78
  } else if (c && c.sel) {
79
79
  children = [c];
80
80
  }
@@ -82,7 +82,7 @@ function h(sel, b, c) {
82
82
  if (is.array(b)) {
83
83
  children = b;
84
84
  } else if (is.primitive(b)) {
85
- text = b;
85
+ text = b.toString();
86
86
  } else if (b && b.sel) {
87
87
  children = [b];
88
88
  } else {
@@ -582,7 +582,7 @@ const array = Array.isArray;
582
582
  exports.array = array;
583
583
 
584
584
  function primitive(s) {
585
- return typeof s === "string" || typeof s === "number";
585
+ return typeof s === "string" || typeof s === "number" || s instanceof String;
586
586
  }
587
587
 
588
588
  },{}],6:[function(require,module,exports){
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snabberb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Mao
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-08-13 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal