@symbo.ls/create 2.10.32 → 2.10.38

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.
Files changed (2) hide show
  1. package/index.js +11 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import DOM from 'domql'
4
4
  import { transformDOMQLEmotion } from 'domql/packages/emotion'
5
+ import { router } from 'domql/packages/router'
5
6
 
6
7
  import * as utils from '@symbo.ls/utils'
7
8
  import * as domqlUtils from '@domql/utils'
@@ -37,7 +38,13 @@ export const create = async (App, options = defaultOptions) => {
37
38
  const key = options.key || SYMBOLS_KEY || (appIsKey ? App : '')
38
39
 
39
40
  if (appIsKey) App = {}
40
- if (key && options.editor) await fetchProject(key, options)
41
+ if (key && options.editor) {
42
+ try {
43
+ await fetchProject(key, options)
44
+ } catch (e) {
45
+ console.error(e)
46
+ }
47
+ }
41
48
 
42
49
  const emotion = defaultEmotion || createEmotion()
43
50
  const initOptions = options.initOptions || { emotion }
@@ -63,14 +70,15 @@ export const create = async (App, options = defaultOptions) => {
63
70
  system: designSystem || {},
64
71
  utils: { ...utils, ...domqlUtils },
65
72
  define: defaultDefine,
66
- registry: emotionDefine
73
+ registry: emotionDefine,
74
+ router: options.router || router
67
75
  }
68
76
  }, (options.parent || document).body, key, {
69
77
  extend: [uikit.Box],
70
78
  verbose: options.verbose,
71
79
  ...options.domqlOptions
72
80
  })
73
-
81
+
74
82
  return domqlElement
75
83
  }
76
84
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.10.32",
3
+ "version": "2.10.38",
4
4
  "license": "MIT",
5
- "gitHead": "bdab9007985fa0430e5511b47f0597377e596cb4",
5
+ "gitHead": "d37db9c4535473bd491cf59beaf4877aac944b74",
6
6
  "source": "index.js",
7
7
  "main": "index.js",
8
8
  "dependencies": {