quasar-ui-danx 0.4.14 → 0.4.15

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": "quasar-ui-danx",
3
- "version": "0.4.14",
3
+ "version": "0.4.15",
4
4
  "author": "Dan <dan@flytedesk.com>",
5
5
  "description": "DanX Vue / Quasar component library",
6
6
  "license": "MIT",
@@ -375,7 +375,7 @@ export function fMarkdownCode(type: string, string: string | object): string {
375
375
  if (typeof string === "object" || isJSON(string)) {
376
376
  switch (type) {
377
377
  case "yaml":
378
- string = stringifyYAML(string);
378
+ string = stringifyYAML(typeof string === "string" ? JSON.parse(string) : string);
379
379
  break;
380
380
  case "ts":
381
381
  string = "";
@@ -9,8 +9,8 @@ const store = new Map<string, any>();
9
9
  * Returns the stored object that should be used instead of the passed object as the returned object is shared across the system
10
10
  */
11
11
  export function storeObject<T extends TypedObject>(newObject: T): ShallowReactive<T> {
12
- const id = newObject.id || newObject.name;
13
- const type = newObject.__type;
12
+ const id = newObject?.id || newObject?.name;
13
+ const type = newObject?.__type;
14
14
  if (!id || !type) return shallowReactive(newObject);
15
15
 
16
16
  if (!newObject.__id) {