Skip to content

Commit

Permalink
Fix for the triggering badger events in the sanity
Browse files Browse the repository at this point in the history
  • Loading branch information
kdivya153 committed Nov 21, 2024
1 parent bcaf588 commit 3f55310
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/MenuBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export default class MenuBuilder {
const examples = methodObj.examples;
if ((hasTag(methodObj, 'property') || hasTag(methodObj, 'property:readonly')) && !hasTag(methodObj, 'property:immutable')) {
examples.push({
name: CONSTANTS.SUBSCRIBE + ' ' + methodObj.name,
name: CONSTANTS.ADDITIONAL_SUBSCRIBE + ' ' + methodObj.name,
schema: {
type: 'number',
},
Expand Down
2 changes: 1 addition & 1 deletion src/MethodFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class MethodFilters {

isSubscribeMethod(method) {
let isSubscribe = false;
if (method.name && method.name.split(' ')[0] === CONSTANTS.SUBSCRIBE) {
if (method.name && method.name.startsWith(CONSTANTS.ADDITIONAL_SUBSCRIBE)) {
isSubscribe = true;
}
return isSubscribe;
Expand Down
1 change: 1 addition & 0 deletions src/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export const CONSTANTS = {
METHODS_TO_BE_EXCLUDED_ONLY_DEVICES: [],
PUBSUB_ACK: { pubSubStatus: 'Connection successful' },
SUBSCRIBE: 'Subscribe',
ADDITIONAL_SUBSCRIBE: 'Subscribing additional methods',
PROVIDER_REGISTRATION: 'provider registered successfully',
PROVIDER_REGISTRATION_FAILED: 'Provider registeration failed',
NO_PROVIDER_SPECIFIED: 'No provider has been specified',
Expand Down

0 comments on commit 3f55310

Please sign in to comment.