Skip to content

Commit

Permalink
fix(android): correctly process bootstrap paths
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews authored and ewanharris committed Jun 1, 2021
1 parent 805722e commit a54296e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/lib/tasks/process-js-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class ProcessJsTask extends IncrementalFileTask {
throw new Error(`Unable to resolve relative path for ${filePathAndName}.`);
}

const bootstrapPath = file.substr(0, file.length - 3); // Remove the ".js" extension.
const bootstrapPath = file.substr(0, file.length - 3).replace(/\\/g, '/'); // Remove the ".js" extension.
if (bootstrapPath.endsWith('.bootstrap') && !this.jsBootstrapFiles.includes(bootstrapPath)) {
this.jsBootstrapFiles.push(bootstrapPath);
}
Expand Down Expand Up @@ -366,7 +366,7 @@ class ProcessJsTask extends IncrementalFileTask {
*/
async handleDeletedFile(filePathAndName) {
let file = this.resolveRelativePath(filePathAndName, this.data.jsFiles);
const bootstrapPath = file.substr(0, file.length - 3); // Remove the ".js" extension.
const bootstrapPath = file.substr(0, file.length - 3).replace(/\\/g, '/'); // Remove the ".js" extension.
if (bootstrapPath.endsWith('.bootstrap')) {
const index = this.jsBootstrapFiles.indexOf(bootstrapPath);
if (index !== -1) {
Expand Down

0 comments on commit a54296e

Please sign in to comment.