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:
parent
b5c377ec73
commit
1a5d7e400d
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue