Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.catch(error => {
console.warn(error);
deferred.resolve(
new MultiTableEntry({ identifier: identifier, dataCatalog: self, paths: options.paths })
);
});
}
.then(storeEntry => {
const entry = new MultiTableEntry({
identifier: identifier,
dataCatalog: self,
paths: options.paths
});
if (storeEntry) {
mergeMultiTableEntry(entry, storeEntry);
}
deferred.resolve(entry);
})
.catch(error => {
getMultiTableEntry(options) {
const self = this;
const identifier = generateEntryCacheId(options);
if (self.multiTableEntries[identifier]) {
return self.multiTableEntries[identifier];
}
const deferred = $.Deferred();
self.multiTableEntries[identifier] = deferred.promise();
if (!cacheEnabled) {
deferred
.resolve(
new MultiTableEntry({ identifier: identifier, dataCatalog: self, paths: options.paths })
)
.promise();
} else {
self.multiTableStore
.getItem(identifier)
.then(storeEntry => {
const entry = new MultiTableEntry({
identifier: identifier,
dataCatalog: self,
paths: options.paths
});
if (storeEntry) {
mergeMultiTableEntry(entry, storeEntry);
}
deferred.resolve(entry);
})