Skip to content

Commit

Permalink
chore: remove warnings in production, closes #1415
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed May 4, 2021
1 parent f79f4cf commit c6dc2ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/app-backend-core/src/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function getComponentInstance (instanceId: string, ctx: BackendContext) {
instanceId = `${ctx.currentAppRecord.id}:root`
}
const instance = ctx.currentAppRecord.instanceMap.get(instanceId)
if (!instance) {
if (!instance && process.env.NODE_ENV !== 'production') {
console.warn(`Instance uid=${instanceId} not found`)
}
return instance
Expand Down
2 changes: 1 addition & 1 deletion packages/app-backend-core/src/timeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export async function sendTimelineEventData (id: ID, ctx: BackendContext) {
if (eventData) {
data = await ctx.api.inspectTimelineEvent(eventData, ctx.currentAppRecord.options.app)
data = stringify(data)
} else {
} else if (process.env.NODE_ENV !== 'production') {
console.warn(`Event ${id} not found`)
}
ctx.bridge.send(BridgeEvents.TO_FRONT_TIMELINE_EVENT_DATA, {
Expand Down

0 comments on commit c6dc2ea

Please sign in to comment.