domql 1.6.63 → 1.6.64

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,7 +1,7 @@
1
1
  {
2
2
  "name": "domql",
3
3
  "description": "DOM rendering Javascript framework at early stage.",
4
- "version": "1.6.63",
4
+ "version": "1.6.64",
5
5
  "repository": "https://github.com/domql/domql",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org"
@@ -1,7 +1,11 @@
1
1
  'use strict'
2
2
 
3
3
  import { create } from '..'
4
- import { exec } from '@domql/utils'
4
+ import {
5
+ exec,
6
+ isString,
7
+ replaceLiteralsWithObjectFields
8
+ } from '@domql/utils'
5
9
 
6
10
  /**
7
11
  * Creates a text node and appends into
@@ -20,7 +24,10 @@ export const asd = (param, element, node) => {
20
24
  }
21
25
 
22
26
  export default (param, element, node) => {
23
- const prop = exec(param, element)
27
+ let prop = exec(param, element)
28
+ if (isString(prop) && prop.includes('{{')) {
29
+ prop = replaceLiteralsWithObjectFields(prop, element.state)
30
+ }
24
31
  if (element.tag === 'string') {
25
32
  if (element.text === prop) return
26
33
  node.nodeValue = prop