astro-pure 1.3.5 → 1.3.6
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.
|
@@ -34,8 +34,7 @@ const { class: className } = Astro.props
|
|
|
34
34
|
|
|
35
35
|
connectedCallback() {
|
|
36
36
|
// Because virtual:config can only be accessed using json string, function cannot work, so we need to use new Function
|
|
37
|
-
const targetFunction =
|
|
38
|
-
// const targetFunction = new Function('return ' + quote.target)()
|
|
37
|
+
const targetFunction = new Function('data', 'return (' + quote.target + ')(data)')
|
|
39
38
|
fetch(quote.server)
|
|
40
39
|
.then((response) => response.json())
|
|
41
40
|
.then((data) => this.render(targetFunction(data)))
|