Skip to content

Commit

Permalink
Fixed font publisher and locale request issues. (#1016)
Browse files Browse the repository at this point in the history
  • Loading branch information
azaslonov authored Nov 3, 2020
1 parent 4702d58 commit ee5c3d7
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
52 changes: 26 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@
"webpack-merge": "^5.2.0"
},
"dependencies": {
"@paperbits/azure": "0.1.344",
"@paperbits/common": "0.1.344",
"@paperbits/core": "0.1.344",
"@paperbits/prosemirror": "0.1.344",
"@paperbits/styles": "0.1.344",
"@paperbits/azure": "0.1.346",
"@paperbits/common": "0.1.346",
"@paperbits/core": "0.1.346",
"@paperbits/prosemirror": "0.1.346",
"@paperbits/styles": "0.1.346",
"@webcomponents/custom-elements": "1.4.2",
"@webcomponents/shadydom": "^1.7.4",
"adal-vanilla": "^1.0.18",
Expand Down
18 changes: 9 additions & 9 deletions src/persistence/mapiObjectStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,14 @@ export class MapiObjectStorage implements IObjectStorage {

public async getObject<T>(key: string): Promise<T> {
try {
if (key === "locales") {
return <any>{
key: `contentTypes/locales/contentItem/en_us`,
code: "en-us",
displayName: "English (US)"
};
}

const resource = this.paperbitsKeyToArmResource(key);
const contentType = this.getContentTypeFromResource(resource);
const isLocalized = localizedContentTypes.includes(contentType);
Expand All @@ -232,14 +240,6 @@ export class MapiObjectStorage implements IObjectStorage {
this.delocalizeBlock(converted);
}

if (key === "locales") {
return <any>{
key: `contentTypes/locales/contentItem/en_us`,
code: "en-us",
displayName: "English (US)"
};
}

if (key.includes("settings") || key.includes("styles")) {
return (<any>converted).nodes[0];
}
Expand Down Expand Up @@ -412,7 +412,7 @@ export class MapiObjectStorage implements IObjectStorage {
return paperbitsContract.nodes;
}
else {
return await this.loadNextPage(resource, localeSearchPrefix, filterQueryString, 0, isLocalized);
return await this.loadNextPage(resource, localeSearchPrefix, filterQueryString, 0, isLocalized);

}
}
Expand Down

0 comments on commit ee5c3d7

Please sign in to comment.