Skip to content

Commit

Permalink
feat: cache last uri parameters
Browse files Browse the repository at this point in the history
close #77
  • Loading branch information
Vinzent03 committed Sep 30, 2022
1 parent 9a95c85 commit 825150c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const DEFAULT_SETTINGS: AdvancedURISettings = {

export default class AdvancedURI extends Plugin {
settings: AdvancedURISettings;
lastParameters?: Object;

async onload() {
await this.loadSettings();
Expand Down Expand Up @@ -83,6 +84,7 @@ export default class AdvancedURI extends Plugin {
for (const parameter in parameters) {
(parameters as any)[parameter] = decodeURIComponent((parameters as any)[parameter]);
}
this.lastParameters = { ...parameters };
if (parameters.uid) {
const res = this.getFileFromUID(parameters.uid)?.path;
if (res != undefined) {
Expand Down

0 comments on commit 825150c

Please sign in to comment.