Skip to content

Commit

Permalink
style(contentful): remove useless code
Browse files Browse the repository at this point in the history
and remove comments
  • Loading branch information
dpinol committed Jun 15, 2021
1 parent e02752d commit ee9efdb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,6 @@ export class ImportContentUpdater {
}

private async updateFields(content: ContentToImport) {
for (const field of getFieldsForContentType(content.contentId.model)) {
const f = CONTENT_FIELDS.get(field)!
switch (f.valueType) {
case ContentFieldValueType.STRING_ARRAY:
case ContentFieldValueType.STRING:
break
default:
continue
}
}
const newVal = await this.manageCms.updateFields(
this.context,
content.contentId,
Expand Down
4 changes: 1 addition & 3 deletions packages/botonic-plugin-contentful/src/util/memoizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ export class Memoizer {
const cache: Cache<Return> = this.cacheFactory()
const f = (...args: Args) =>
this.strategy<Args, Return>(cache, this.normalizer, func, ...args)
// f.cache = cache
return f as F
}
}

/***
* Only reinvoke if not in cache
* Only re-invoke if not in cache
*/
export const cacheForeverStrategy: MemoizerStrategy = async <
Args extends any[],
Expand Down Expand Up @@ -87,7 +86,6 @@ export function fallbackStrategy(
func: (...args: Args) => Promise<Return>,
...args: Args
) => {
// return func(...args)
const id = normalizer(...args)
const oldVal = cache.get(id)

Expand Down

0 comments on commit ee9efdb

Please sign in to comment.