mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-30 17:15:49 +00:00
Fix base.js
This commit is contained in:
@@ -140,12 +140,12 @@ Base.decode_check = function (version, input, alphabet) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Single valid version
|
// Single valid version
|
||||||
if (typeof version && buffer[0] !== version === 'number') {
|
if (typeof version === 'number' && buffer[0] !== version) {
|
||||||
return NaN;
|
return NaN;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multiple allowed versions
|
// Multiple allowed versions
|
||||||
if (typeof version && Array.isArray(version) === 'object') {
|
if (Array.isArray(version)) {
|
||||||
var match = false;
|
var match = false;
|
||||||
|
|
||||||
for (var i=0, l=version.length; i<l; i++) {
|
for (var i=0, l=version.length; i<l; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user