Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScriptAttribute fix #6750

Merged
merged 4 commits into from
Jun 25, 2024
8 changes: 7 additions & 1 deletion src/framework/script/script-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,18 @@
*/
export function assignAttributesToScript(app, attributeSchemaMap, data, script) {

if(!data) return;

Check failure on line 183 in src/framework/script/script-attributes.js

View workflow job for this annotation

GitHub Actions / Lint

Expected space(s) after "if"

// Iterate over the schema and assign corresponding data
for (const attributeName in attributeSchemaMap) {
const attributeSchema = attributeSchemaMap[attributeName];
const dataToAssign = data[attributeName];

// Skip if the data is not defined
if(dataToAssign === undefined) continue;

Check failure on line 191 in src/framework/script/script-attributes.js

View workflow job for this annotation

GitHub Actions / Lint

Expected space(s) after "if"

// Assign the value to the script based on the attribute schema
script[attributeName] = attributeToValue(app, attributeSchema, dataToAssign, script);
script[attributeName] = attributeToValue(app, attributeSchema, dataToAssign, script[attributeName]);
}
}

Expand All @@ -199,6 +204,7 @@
*/
class ScriptAttributes {
static assignAttributesToScript = assignAttributesToScript;
static attributeToValue = attributeToValue;

Check failure on line 207 in src/framework/script/script-attributes.js

View workflow job for this annotation

GitHub Actions / Lint

Expected blank line between class members

/**
* Create a new ScriptAttributes instance.
Expand Down
Loading