@zyrab/domo 1.2.0 → 1.2.1

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": "@zyrab/domo",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Minimalist DOM builder and chaining-friendly micro-framework with router support.",
5
5
  "main": "./src/domo.js",
6
6
  "type": "module",
package/src/children.js CHANGED
@@ -173,7 +173,7 @@ class Children {
173
173
  if(condition) {
174
174
  // @ts-ignore - Ignore potential 'Domo is not defined' for JSDoc tool
175
175
  if (!condition) {
176
- return new Domo("if")
176
+ return new DomoClass("if")
177
177
  .attr({
178
178
  hidden: true,
179
179
  })
package/src/events.js CHANGED
@@ -35,7 +35,8 @@ class Events {
35
35
  */
36
36
 
37
37
  on(eventMapOrName, callback, options = {}) {
38
- if (this._virtual && eventMapOrName !== null) {
38
+ if (!eventMapOrName || !callback) return this;
39
+ if (this._virtual) {
39
40
  if (options.ssg === false) return this;
40
41
  const elId = this.element._attr?.id;
41
42
  if (!elId) throw new Error(`[Domo.on] .id() must be called before .on(...) in SSG mode`);