GoogleChrome / GoogleChrome/workbox

Chrome 60: Error parsing 'integrity' attribute ('undefined').

Open
#3,370 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
13k
Forks
880
Avg merge
2h 44m
Merged PRs (30d)
8

Description

**Library Affected**:
7.1.0

**Browser & Platform**:
Chromium v60.0.3112.0

**Issue or Feature Request Description**:

Errors in console:
```
(11) Error parsing 'integrity' attribute ('undefined'). The hash algorithm must be one of 'sha256', 'sha384', 'sha512', followed by a '-' character.
```

It seems that Old Chromium versions show errors when fetching Request with `integrity: undefined`.
One of such example:

https://github.com/GoogleChrome/workbox/blob/9e69c4269c35e2db9fbba4d13e4e6206c7b66d2a/packages/workbox-precaching/src/PrecacheController.ts#L212-L216

Fix is to omit the `integrity` attribute when it's undefined.

Errors are not present in Chromium 64+

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.