tuijs-meta 0.0.6 → 0.0.7
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/README.md +1 -1
- package/package.json +1 -1
- package/src/lib/tuiMeta.js +2 -2
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ tuiMeta(siteData['*']);
|
|
|
122
122
|
1. When the 'tuiMeta' function is called, the site data provided is first checked to ensure that it is an Object.
|
|
123
123
|
2. The function then validates that the 'title' key exists.
|
|
124
124
|
- If the 'title' key exists, the function attempts to update the document title with the 'title' key value.
|
|
125
|
-
- If the 'title' key DOES NOT exists, no error is generated and the function just
|
|
125
|
+
- If the 'title' key DOES NOT exists, no error is generated and the function just moves on.
|
|
126
126
|
2. The function then validates that the 'meta' key exists.
|
|
127
127
|
- If the 'meta' key exists, the function then validates that the value of the 'meta' key is an Array, throwing an error if it is not.
|
|
128
128
|
-If the 'meta' key value is an Array, then the function attempts to update the document meta tags with the 'meta' key Array data. As as reminder this Array consists of Objects, each representing a single meta tag. Within each Object, there is a set as many or as few key/value pairs as needed, each representing a single meta tag attribute and its value.
|
package/package.json
CHANGED
package/src/lib/tuiMeta.js
CHANGED
|
@@ -42,7 +42,7 @@ export function metaUpdateHead(data) {
|
|
|
42
42
|
}
|
|
43
43
|
return;
|
|
44
44
|
} catch (er) {
|
|
45
|
-
throw new Error(er);
|
|
45
|
+
throw new Error(er.message);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -87,7 +87,7 @@ export function metaUpdateTag(data) {
|
|
|
87
87
|
document.head.appendChild(elmMeta);
|
|
88
88
|
return;
|
|
89
89
|
} catch (er) {
|
|
90
|
-
throw new Error(er);
|
|
90
|
+
throw new Error(er.message);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|