nodebb-theme-harmony 1.0.8 → 1.0.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-theme-harmony",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "nbbpm": {
5
5
  "compatibility": "^3.0.0"
6
6
  },
package/public/harmony.js CHANGED
@@ -251,11 +251,12 @@ $(document).ready(function () {
251
251
  if (count > 1) {
252
252
  const listEls = document.querySelectorAll(`[component="${type}/list"]`);
253
253
  listEls.forEach((listEl) => {
254
- const placeholder = listEl.querySelector('li');
255
-
256
- for (let x = 0; x < count - 1; x++) {
257
- const cloneEl = placeholder.cloneNode(true);
258
- listEl.insertBefore(cloneEl, placeholder);
254
+ const placeholder = listEl.querySelector('*');
255
+ if (placeholder) {
256
+ for (let x = 0; x < count - 1; x++) {
257
+ const cloneEl = placeholder.cloneNode(true);
258
+ listEl.insertBefore(cloneEl, placeholder);
259
+ }
259
260
  }
260
261
  });
261
262
  }