@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 CHANGED
@@ -1,6 +1,12 @@
1
1
  ## Release History
2
2
 
3
3
 
4
+
5
+ ### 1.1.1 ( 2025-01-20 )
6
+ - [x] Improve: Error messages when using method "set" with string;
7
+
8
+
9
+
4
10
  ### 1.1.0 ( 2025-01-19 )
5
11
  - [x] Ignore html comment sections in templates;
6
12
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peter.naydenov/morph",
3
3
  "description": "Template engine",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "license": "MIT",
6
6
  "author": "Peter Naydenov",
7
7
  "main": ".src/main.js",
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 () {