fix: Fixes importing url encoded recipe deeplinks (#3446)
This commit is contained in:
@@ -158,7 +158,8 @@ export default function RecipesView({ onLoadRecipe }: RecipesViewProps = {}) {
|
|||||||
if (!configBase64) {
|
if (!configBase64) {
|
||||||
throw new Error('No recipe configuration found in deeplink');
|
throw new Error('No recipe configuration found in deeplink');
|
||||||
}
|
}
|
||||||
const configJson = Buffer.from(configBase64, 'base64').toString('utf-8');
|
const urlDecoded = decodeURIComponent(configBase64);
|
||||||
|
const configJson = Buffer.from(urlDecoded, 'base64').toString('utf-8');
|
||||||
const recipe = JSON.parse(configJson) as Recipe;
|
const recipe = JSON.parse(configJson) as Recipe;
|
||||||
|
|
||||||
if (!recipe.title || !recipe.description || !recipe.instructions) {
|
if (!recipe.title || !recipe.description || !recipe.instructions) {
|
||||||
|
|||||||
Reference in New Issue
Block a user