mirror of
https://github.com/zotero/zotero.git
synced 2026-10-07 02:58:09 +00:00
Throw proper error for "key must be an 8-character string" error
This commit is contained in:
parent
4aaec5f091
commit
fc1f737986
1 changed files with 2 additions and 2 deletions
|
|
@ -1969,8 +1969,8 @@ Zotero.Attachments = new function(){
|
|||
|
||||
this.getStorageDirectoryByLibraryAndKey = function (libraryID, key) {
|
||||
if (typeof key != 'string' || !key.match(/^[A-Z0-9]{8}$/)) {
|
||||
throw ('key must be an 8-character string in '
|
||||
+ 'Zotero.Attachments.getStorageDirectoryByLibraryAndKey()')
|
||||
Zotero.debug(key, 1);
|
||||
throw new Error('key must be an 8-character string');
|
||||
}
|
||||
var dir = Zotero.getStorageDirectory();
|
||||
dir.append(key);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue