@peter.naydenov/morph 1.1.0 → 1.1.1
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/Changelog.md +6 -0
- package/package.json +1 -1
- package/src/main.js +5 -0
package/Changelog.md
CHANGED
package/package.json
CHANGED
package/src/main.js
CHANGED
|
@@ -35,6 +35,11 @@ const storage = ( () => ({default: {}}) ) ();
|
|
|
35
35
|
* either the storage or template does not exist.
|
|
36
36
|
*/
|
|
37
37
|
function get ( location ) {
|
|
38
|
+
if ( !(location instanceof Array) ) {
|
|
39
|
+
return function () {
|
|
40
|
+
return 'Error: Argument "location" is a string. Should be an array. E.g. ["templateName", "storageName"].'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
38
43
|
const [prop, strName='default'] = location;
|
|
39
44
|
if ( !storage[strName] ) {
|
|
40
45
|
return function () {
|