Skip to content

Commit

Permalink
Parse twin value to JSON (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
formulahendry authored Mar 15, 2019
1 parent 616f398 commit 72e6bb4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion assets/marketplace/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>

<body>
<div id="app" data-endpoint="{{endpoint}}">
<div id="app" data-endpoint="{{endpoint}}" v-cloak>
<div id="content">
<div id="main-content">
<div v-if="!errorMessageInitialization">
Expand Down
6 changes: 5 additions & 1 deletion assets/marketplace/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ const app = new Vue({
if (this.selectedModule.metadata.twins && this.selectedModule.metadata.twins.length > 0) {
const twinObject = {};
for (const twin of this.selectedModule.metadata.twins) {
twinObject[twin.name] = twin.value
let twinValue = twin.value;
try {
twinValue = JSON.parse(twinValue);
} catch (error) {}
twinObject[twin.name] = twinValue;
}
twins = {
"properties.desired": twinObject
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "azure-iot-edge",
"displayName": "Azure IoT Edge",
"description": "Develop, deploy, debug, and manage your IoT Edge solution",
"version": "1.11.0-rc",
"version": "1.11.0-rc2",
"publisher": "vsciot-vscode",
"aiKey": "95b20d64-f54f-4de3-8ad5-165a75a6c6fe",
"icon": "logo.png",
Expand Down

0 comments on commit 72e6bb4

Please sign in to comment.