Skip to content

Commit f1afe6b

Browse files
committed
Increase a optional param to data key response
1 parent 7793550 commit f1afe6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mixins/ApiForm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ export default {
5555
this.create(saveCallback, errCallback);
5656
}
5757
},
58-
load(id, errCallback = (err) => {}) {
58+
load(id, errCallback = (err) => {}, dataKey) {
5959
if (id) {
6060
this.$api.get(`${this.route}/${id}/`).then((response) => {
61-
this.requestObj = response.data;
61+
this.requestObj = response[dataKey] || response.data;
6262
}).catch((err) => {
6363
errCallback(err);
6464
});

0 commit comments

Comments
 (0)