diff --git a/lime/tools/helpers/HTML5Helper.hx b/lime/tools/helpers/HTML5Helper.hx index b29c3af4c..d57c34d95 100644 --- a/lime/tools/helpers/HTML5Helper.hx +++ b/lime/tools/helpers/HTML5Helper.hx @@ -191,7 +191,7 @@ class HTML5Helper { } - if (project.debug || project.targetFlags.exists ("source-map")) { + if (FileSystem.exists (sourceFile + ".map") || project.targetFlags.exists ("source-map")) { args.push ("--create_source_map"); args.push (tempFile + ".map"); @@ -213,7 +213,7 @@ class HTML5Helper { ProcessHelper.runCommand ("", "java", args); - if (project.debug || project.targetFlags.exists ("source-map")) { + if (FileSystem.exists (tempFile + ".map")) { File.copy (tempFile + ".map", sourceFile + ".map"); FileSystem.deleteFile (tempFile + ".map");