Skip to content

Commit bffbc2b

Browse files
committed
Support compilation extrafiles on ChromeOS
Similarly to what has been done in #498, we're adding support to extrafiles compilation on ChromeOS as well. See also #498
1 parent 34420ed commit bffbc2b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-create-agent-js-client",
3-
"version": "2.6.0",
3+
"version": "2.7.0",
44
"description": "JS module providing discovery of the Arduino Create Plugin and communication with it",
55
"main": "lib/index.js",
66
"module": "es/index.js",

src/chrome-app-daemon.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ export default class ChromeOsDaemon extends Daemon {
239239
*/
240240
_upload(uploadPayload, uploadCommandInfo) {
241241
const { board, port, commandline, data } = uploadPayload;
242-
try {
242+
const extrafiles = uploadCommandInfo && uploadCommandInfo.files && Array.isArray(uploadCommandInfo.files) || []
243+
try {
243244
window.oauth.token().then(token => {
244245
this.channel.postMessage({
245246
command: 'upload',
@@ -249,7 +250,7 @@ export default class ChromeOsDaemon extends Daemon {
249250
commandline,
250251
data,
251252
token: token.token,
252-
extrafiles: uploadCommandInfo.files || []
253+
extrafiles
253254
}
254255
});
255256
});

0 commit comments

Comments
 (0)