Skip to content

Commit a17870f

Browse files
committed
Resolve conflicts
1 parent 2f1d0ee commit a17870f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/LiveComponent/assets/dist/live_controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ function setDeepData(data, propertyPath, value, modelValue = null) {
975975
}
976976
if (typeof currentLevelData !== 'object') {
977977
const lastPart = parts.pop();
978-
throw new Error(`Cannot set data-model="${propertyPath}". They parent "${parts.join(',')}" data does not appear to be an object (it's "${currentLevelData}"). Did you forget to add exposed={"${lastPart}"} to its LiveProp?`);
978+
throw new Error(`Cannot set data-model="${propertyPath}". The parent "${parts.join('.')}" data does not appear to be an object (it's "${currentLevelData}"). Did you forget to add exposed={"${lastPart}"} to its LiveProp?`);
979979
}
980980
if (currentLevelData[finalKey] === undefined) {
981981
const lastPart = parts.pop();
@@ -1149,7 +1149,7 @@ class default_1 extends Controller {
11491149
}
11501150
throw new Error(`The update() method could not be called for "${clonedElement.outerHTML}": the element must either have a "data-model" or "name" attribute set to the model name.`);
11511151
}
1152-
this.$updateModel(model, value, shouldRender, element.hasAttribute('name') ? element.getAttribute('name') : null, {}, element.hasAttribute('value') ? element.getAttribute('value') : null);
1152+
this.$updateModel(model, value, shouldRender, element.hasAttribute('name') ? element.getAttribute('name') : null, {}, this._getValueFromElement(element));
11531153
}
11541154
$updateModel(model, value, shouldRender = true, extraModelName = null, options = {}, modelValue = null) {
11551155
const directives = parseDirectives(model);

src/LiveComponent/assets/src/live_controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export default class extends Controller {
232232
throw new Error(`The update() method could not be called for "${clonedElement.outerHTML}": the element must either have a "data-model" or "name" attribute set to the model name.`);
233233
}
234234

235-
this.$updateModel(model, value, shouldRender, element.hasAttribute('name') ? element.getAttribute('name') : null, {}, element.hasAttribute('value') ? element.getAttribute('value') : null);
235+
this.$updateModel(model, value, shouldRender, element.hasAttribute('name') ? element.getAttribute('name') : null, {}, this._getValueFromElement(element));
236236
}
237237

238238
/**

0 commit comments

Comments
 (0)