Skip to content

Commit

Permalink
feat: add compatibility with official ReVanced sources #115
Browse files Browse the repository at this point in the history
  • Loading branch information
inotia00 committed Oct 10, 2023
1 parent 9b533ff commit 681348f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils/PatchesParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ module.exports = async function parsePatch(packageName, hasRoot) {
/** @type {string} */
let compatibleVersion;

if (patch.compatiblePackages === null) continue;

for (const pkg of patch.compatiblePackages)
if (pkg.name === packageName) {
isCompatible = true;
Expand All @@ -43,7 +45,7 @@ module.exports = async function parsePatch(packageName, hasRoot) {

patches.push({
name: patch.name,
description: patch.description,
description: patch.description || ' ',
maxVersion: compatibleVersion || ' ',
isRooted,
excluded: patch.excluded || patch.deprecated || !patch.use
Expand Down
1 change: 1 addition & 0 deletions wsEvents/getApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = async function getPatches(ws) {
const list = [];

for (const patches of patchesList) {
if (patches.compatiblePackages === null) continue;
for (const packages of patches.compatiblePackages) {
if (!appsList.some((el) => el.pname === packages.name))
appsList.push({ pname: packages.name });
Expand Down

0 comments on commit 681348f

Please sign in to comment.