Skip to content

Commit

Permalink
Merge pull request #200 from lightning-js/dev
Browse files Browse the repository at this point in the history
Release 1.8.2
  • Loading branch information
michielvandergeest authored Oct 30, 2024
2 parents 3f3143a + da8ca21 commit 551ba41
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v1.8.2

_30 oct 2024_

- Fixed edgecase issue with array based props not triggering reactivity


## v1.8.1

_29 oct 2024_
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightningjs/blits",
"version": "1.8.1",
"version": "1.8.2",
"description": "Blits: The Lightning 3 App Development Framework",
"bin": "bin/index.js",
"exports": {
Expand Down
16 changes: 11 additions & 5 deletions src/lib/codegenerator/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ let counter

export default function (templateObject = { children: [] }) {
const ctx = {
renderCode: ['const elms = []', 'let componentType', 'const rootComponent = component'],
renderCode: [
'const elms = []',
'let componentType',
'const rootComponent = component',
'let propData',
],
effectsCode: [],
context: { props: [], components: this.components },
}
Expand Down Expand Up @@ -213,10 +218,11 @@ const generateComponentCode = function (
options.component
)}`)
renderCode.push(`
props${counter}['${key.substring(1)}']= ${interpolate(
templateObject[key],
options.component
)}`)
propData = ${interpolate(templateObject[key], options.component)}
if (Array.isArray(propData) === true) {
propData = getRaw(propData).slice(0)
}
props${counter}['${key.substring(1)}'] = propData`)
} else {
renderCode.push(
`props${counter}['${key}'] = ${cast(templateObject[key], key, options.component)}`
Expand Down

0 comments on commit 551ba41

Please sign in to comment.