Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tools/file_packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,15 +805,9 @@ def generate_js(data_target, data_files, metadata):
var DB_VERSION = 1;
var METADATA_STORE_NAME = 'METADATA';
var PACKAGE_STORE_NAME = 'PACKAGES';
function openDatabase(callback, errback) {'''
if options.support_node:
code += '''
if (isNode) {
return errback();
}'''
code += '''
function openDatabase(callback, errback) {
if (typeof indexedDB == 'undefined') {
throw 'using IndexedDB to cache data can only be done on a web page or in a web worker';
return errback('using IndexedDB to cache data can only be done on a web page or in a web worker');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do have test coverage for this since without this part of the change the other.test_file_packager_separate_metadata fails under node

}
try {
var openRequest = indexedDB.open(DB_NAME, DB_VERSION);
Expand Down