1
0
Fork 0
mirror of https://github.com/gorhill/uMatrix.git synced 2024-05-20 20:23:37 +12:00

fix backward compatibility of restore from backup feature

This commit is contained in:
Raymond Hill 2018-02-03 08:46:34 -05:00
parent b5c377ec73
commit 1a5d7e400d
No known key found for this signature in database
GPG key ID: 25E1490B761470C2

View file

@ -1,7 +1,7 @@
/*******************************************************************************
uMatrix - a Chromium browser extension to black/white list requests.
Copyright (C) 2014-2017 Raymond Hill
Copyright (C) 2014-2018 Raymond Hill
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -56,11 +56,12 @@ function restoreUserDataFromFile() {
}
if (
typeof userData !== 'object' ||
typeof userData.app !== 'string' ||
typeof userData.version !== 'string' ||
typeof userData.when !== 'number' ||
typeof userData.settings !== 'object' ||
typeof userData.rules !== 'string' ||
typeof userData.hostsFiles !== 'object'
(typeof userData.rules !== 'string' &&
Array.isArray(userData.rules) === false)
) {
return null;
}