@bbn/bbn 1.0.64 → 1.0.66

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/dist/bundle.js CHANGED
@@ -238,16 +238,16 @@
238
238
  }
239
239
  args.shift();
240
240
  }
241
+ const exec = window.console[fn];
241
242
  if (bbn.env.loggingLevel >= level) {
242
243
  let i = 0;
243
244
  while (i < args.length) {
244
245
  let t = typeof args[i];
246
+ let consoleArguments = [args[i]];
245
247
  if (t === 'string' || t === 'number') {
246
- window.console[fn]('%c %s ', cfg, args[i]);
247
- }
248
- else {
249
- window.console[fn](args[i]);
248
+ consoleArguments.unshift('%c %s ', cfg);
250
249
  }
250
+ exec.apply(window.console, consoleArguments);
251
251
  i++;
252
252
  }
253
253
  }
@@ -1369,7 +1369,7 @@
1369
1369
  if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
1370
1370
  for (let a of args) {
1371
1371
  let res = bbn.cp.isComponent(a);
1372
- if (!res || (0, isDom_1.isDom)(res) || !res.$el?.bbnCid) {
1372
+ if (!res || (0, isDom_1.isDom)(a) || !a.$el?.bbnCid) {
1373
1373
  return false;
1374
1374
  }
1375
1375
  }
@@ -27,16 +27,16 @@ const log = function (...args) {
27
27
  }
28
28
  args.shift();
29
29
  }
30
+ const exec = window.console[fn];
30
31
  if (bbn.env.loggingLevel >= level) {
31
32
  let i = 0;
32
33
  while (i < args.length) {
33
34
  let t = typeof args[i];
35
+ let consoleArguments = [args[i]];
34
36
  if (t === 'string' || t === 'number') {
35
- window.console[fn]('%c %s ', cfg, args[i]);
36
- }
37
- else {
38
- window.console[fn](args[i]);
37
+ consoleArguments.unshift('%c %s ', cfg);
39
38
  }
39
+ exec.apply(window.console, consoleArguments);
40
40
  i++;
41
41
  }
42
42
  }
@@ -6,7 +6,7 @@ const isCp = function (...args) {
6
6
  if ('cp' in bbn && 'isComponent' in bbn['cp'] && (typeof bbn['cp'].isComponent === 'function')) {
7
7
  for (let a of args) {
8
8
  let res = bbn.cp.isComponent(a);
9
- if (!res || isDom(res) || !res.$el?.bbnCid) {
9
+ if (!res || isDom(a) || !a.$el?.bbnCid) {
10
10
  return false;
11
11
  }
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",