add missing return value

add missing return value for `makeMessageContextForTarget`
This commit is contained in:
Eric Zhang 2020-11-19 09:44:39 +08:00 committed by GitHub
parent d3585a3c51
commit 28dc1ea8e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -800,6 +800,7 @@ class Runtime extends EventEmitter {
* Create a context ("args") object for use with `formatMessage` on messages which might be target-specific. * Create a context ("args") object for use with `formatMessage` on messages which might be target-specific.
* @param {Target} [target] - the target to use as context. If a target is not provided, default to the current * @param {Target} [target] - the target to use as context. If a target is not provided, default to the current
* editing target or the stage. * editing target or the stage.
* @returns {object} - the context object.
*/ */
makeMessageContextForTarget (target) { makeMessageContextForTarget (target) {
const context = {}; const context = {};
@ -807,6 +808,7 @@ class Runtime extends EventEmitter {
if (target) { if (target) {
context.targetType = (target.isStage ? TargetType.STAGE : TargetType.SPRITE); context.targetType = (target.isStage ? TargetType.STAGE : TargetType.SPRITE);
} }
return context;
} }
/** /**