1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 15:32:28 +02:00

Fix regression in cloud storage upload/download

Reported in team discussion

Regression from:
- 22022f636f
This commit is contained in:
Raymond Hill 2021-08-03 14:03:00 -04:00
parent a3186fd6e7
commit 5e8f847aeb
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -37,6 +37,7 @@ import staticExtFilteringEngine from './static-ext-filtering.js';
import staticFilteringReverseLookup from './reverselookup.js'; import staticFilteringReverseLookup from './reverselookup.js';
import staticNetFilteringEngine from './static-net-filtering.js'; import staticNetFilteringEngine from './static-net-filtering.js';
import µb from './background.js'; import µb from './background.js';
import { denseBase64 } from './base64-custom.js';
import { redirectEngine } from './redirect-engine.js'; import { redirectEngine } from './redirect-engine.js';
import { StaticFilteringParser } from './static-filtering-parser.js'; import { StaticFilteringParser } from './static-filtering-parser.js';
import { webRequest } from './traffic.js'; import { webRequest } from './traffic.js';
@ -810,7 +811,7 @@ const fromBase64 = function(encoded) {
} }
let u8array; let u8array;
try { try {
u8array = µb.denseBase64.decode(encoded); u8array = denseBase64.decode(encoded);
} catch(ex) { } catch(ex) {
} }
return Promise.resolve(u8array !== undefined ? u8array : encoded); return Promise.resolve(u8array !== undefined ? u8array : encoded);
@ -818,7 +819,7 @@ const fromBase64 = function(encoded) {
const toBase64 = function(data) { const toBase64 = function(data) {
const value = data instanceof Uint8Array const value = data instanceof Uint8Array
? µb.denseBase64.encode(data) ? denseBase64.encode(data)
: data; : data;
return Promise.resolve(value); return Promise.resolve(value);
}; };