Skip to content

Commit

Permalink
Merge pull request #1103 from dpc-sdp/bugfix/markup-plugins
Browse files Browse the repository at this point in the history
fix(@dpc-sdp/ripple-tide-api): allow the use of a single markup plugin
  • Loading branch information
dylankelly authored Apr 11, 2024
2 parents a179ac1 + 14dcbcc commit 4e1ace2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const markupTranspiler = (
const $body = $('body')
let markupData = {}

if (Object.keys(plugins).length > 1) {
if (Object.keys(plugins).length) {
// Load plugins to transpile embedded components
for (const [index, plugin] of plugins.entries()) {
$.prototype[`plugin${index}`] = plugin
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-api/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ declare module 'nitropack' {

// Mapping util interfaces
export function getAddress(address: any): string
export function getBody(body: any): string
export function getBody(body: any, customPlugins?: (() => void)[]): string
export function getBodyFromField(
field: string,
path: string | string[],
Expand Down

0 comments on commit 4e1ace2

Please sign in to comment.