ph-utils 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/lib/dom.js +2 -2
  2. package/package.json +1 -1
package/lib/dom.js CHANGED
@@ -59,12 +59,12 @@ export function transform(element, value) {
59
59
  export function on(element, listener, fn, once = false) {
60
60
  let eventExtra = {};
61
61
  if (typeof once === 'boolean') {
62
- eventExtra.once = true;
62
+ eventExtra.once = once;
63
63
  }
64
64
  else {
65
65
  eventExtra = once;
66
66
  }
67
- if (eventExtra.eventFlag !== null) {
67
+ if (eventExtra.eventFlag != null) {
68
68
  element.setAttribute(eventExtra.eventFlag, '__stop__');
69
69
  element.addEventListener(listener, (e) => {
70
70
  let target = e.target;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "module": "lib/index_m.js",
6
6
  "types": "lib/index.d.ts",
7
7
  "browser": "lib/index_m.js",
8
- "version": "0.1.5",
8
+ "version": "0.1.6",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https//gitee.com/towardly/ph.git",