nomagick commited on
Commit
92f6364
·
unverified ·
1 Parent(s): 008dcba

style: prefer const for originalSrc

Browse files
backend/functions/src/services/snapshot-formatter.ts CHANGED
@@ -231,7 +231,7 @@ export class SnapshotFormatter extends AsyncService {
231
  if (imageRetention === 'alt') {
232
  return alt ? `(Image ${++imgIdx}: ${alt})` : '';
233
  }
234
- let originalSrc = (node.getAttribute('src') || '').trim();
235
  let linkPreferredSrc = originalSrc;
236
  const maybeSrcSet: string = (node.getAttribute('srcset') || '').trim();
237
  if (!linkPreferredSrc && maybeSrcSet) {
 
231
  if (imageRetention === 'alt') {
232
  return alt ? `(Image ${++imgIdx}: ${alt})` : '';
233
  }
234
+ const originalSrc = (node.getAttribute('src') || '').trim();
235
  let linkPreferredSrc = originalSrc;
236
  const maybeSrcSet: string = (node.getAttribute('srcset') || '').trim();
237
  if (!linkPreferredSrc && maybeSrcSet) {