[FIX] base: fix sourcemap header offset
in b1d57adf6ff3 the size of the header added to source files while concatenating them was reduced, but the corresponding offset use when generating source maps was not adapted, causing source maps to drift further and further from the actual source location the further in the compiled asset the line is. This commit fixes that by decrementing the header offset as needed. closes odoo/odoo#102651 X-original-commit: 4d4585ee6c905c2a3adc4692098c1a3544417629 Signed-off-by: Géry Debongnie <ged@odoo.com> Signed-off-by: Samuel Degueldre <sad@odoo.com>
This commit is contained in:
@@ -429,7 +429,7 @@ class AssetsBundle(object):
|
||||
)
|
||||
content_bundle_list = []
|
||||
content_line_count = 0
|
||||
line_header = 6 # number of lines added by with_header()
|
||||
line_header = 5 # number of lines added by with_header()
|
||||
for asset in self.javascripts:
|
||||
if asset.is_transpiled:
|
||||
# '+ 3' corresponds to the 3 lines added at the beginning of the file during transpilation.
|
||||
|
||||
Reference in New Issue
Block a user