npm package diff
Package: @forge/bridge
Versions: 3.5.1-next.3-experimental-c7a7d36 - 4.0.0-next.6
File: package/out/view/getContext.js
Index: package/out/view/getContext.js
===================================================================
--- package/out/view/getContext.js
+++ package/out/view/getContext.js
@@ -1,9 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getContext = void 0;
+const tslib_1 = require("tslib");
const bridge_1 = require("../bridge");
+const i18n_1 = require("@forge/i18n");
const callBridge = (0, bridge_1.getCallBridge)();
-const getContext = () => {
- return callBridge('getContext');
-};
+const getContext = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
+ var _a;
+ const context = yield callBridge('getContext');
+ const locale = context === null || context === void 0 ? void 0 : context.locale;
+ if (locale) {
+ context.locale = (_a = (0, i18n_1.ensureLocale)(locale)) !== null && _a !== void 0 ? _a : locale;
+ }
+ return context;
+});
exports.getContext = getContext;