nbhi 0.6.12 → 0.6.13

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.
@@ -8,6 +8,7 @@ export default selector => {
8
8
  let renderedChildren = new Map();
9
9
  let idCount = 1;
10
10
  let templateChild;
11
+ let templateParent;
11
12
 
12
13
  return data => {
13
14
  if (isDate(data)) {
@@ -154,6 +155,10 @@ export default selector => {
154
155
  };
155
156
 
156
157
  function getParent() {
158
+ if (templateParent) {
159
+ return templateParent;
160
+ }
161
+
157
162
  const topLevel = getTopLevel();
158
163
  if (topLevel.localName === 'table') {
159
164
  return process('tbody', 'tr');
@@ -198,6 +203,7 @@ export default selector => {
198
203
  console.log({ topLevel, parentName });
199
204
  throw new Error('Cannot find parent');
200
205
  }
206
+ templateParent = parent;
201
207
  return parent;
202
208
  }
203
209
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nbhi",
3
- "version": "0.6.12",
3
+ "version": "0.6.13",
4
4
  "description": "No-Build HTML Includes (NBHI) is a simple library that allows you to include html files into other html files and turns them into [web components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components). Lazy initialization of content (when entering the viewport) and a one line call to update/hydrate content in your html pages. No build tools required, no `package.json` needed.",
5
5
  "keywords": [
6
6
  "web-components",
@@ -33,4 +33,4 @@
33
33
  "scripts": {
34
34
  "test": "echo \"Error: no test specified\" && exit 1"
35
35
  }
36
- }
36
+ }