Skip to content

Commit a616f65

Browse files
committed
11.07 changes
1 parent 1e94458 commit a616f65

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

module.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"title": "Monk's Enhanced Journal",
33
"description": "Treat the journal like it's going to be popped out and used as a digital guide book. Add extra information to summarize an encounter. Show summaries of people and places. Allow for bookmarking of commonly used pages",
4-
"version": "11.06",
4+
"version": "11.07",
55
"authors": [
66
{
77
"name": "IronMonk",
@@ -95,7 +95,7 @@
9595
"css/apsjournal.css"
9696
],
9797
"url": "https://github.com/ironmonk88/monks-enhanced-journal",
98-
"download": "https://github.com/ironmonk88/monks-enhanced-journal/archive/11.06.zip",
98+
"download": "https://github.com/ironmonk88/monks-enhanced-journal/archive/11.07.zip",
9999
"manifest": "https://github.com/ironmonk88/monks-enhanced-journal/releases/latest/download/module.json",
100100
"bugs": "https://github.com/ironmonk88/monks-enhanced-journal/issues",
101101
"allowBugReporter": true,

monks-enhanced-journal.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,20 @@ export let isV11 = () => {
7878
};
7979

8080
export let patchFunc = (prop, func, type = "WRAPPER") => {
81-
if (game.modules.get("lib-wrapper")?.active) {
82-
libWrapper.register("monks-enhanced-journal", prop, func, type);
83-
} else {
81+
let nonLibWrapper = () => {
8482
const oldFunc = eval(prop);
8583
eval(`${prop} = function (event) {
8684
return func.call(this, ${type != "OVERRIDE" ? "oldFunc.bind(this)," : ""} ...arguments);
87-
}`);
85+
}`);
86+
}
87+
if (game.modules.get("lib-wrapper")?.active) {
88+
try {
89+
libWrapper.register("monks-enhanced-journal", prop, func, type);
90+
} catch (e) {
91+
nonLibWrapper();
92+
}
93+
} else {
94+
nonLibWrapper();
8895
}
8996
}
9097

0 commit comments

Comments
 (0)