Check arguments to __dynamicImport method call.

This prevents the audit-argument-checks package from complaining about
this method in production.
This commit is contained in:
Ben Newman
2017-02-22 12:28:43 -05:00
parent cd62d4284e
commit a78b09fa85
2 changed files with 5 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ Package.onUse(function (api) {
api.use("localstorage");
api.use("promise");
api.use("ddp");
api.use("check");
api.use("ecmascript", "server");
api.mainModule("client.js", "client");
api.mainModule("server.js", "server");

View File

@@ -5,6 +5,8 @@ import {
normalize as pathNormalize,
} from "path";
import { check } from "meteor/check";
import "./security.js";
import "./client.js";
@@ -19,6 +21,8 @@ Object.keys(dynamicImportInfo).forEach(platform => {
Meteor.methods({
__dynamicImport(tree) {
check(tree, Object);
const platform = this.connection ? "web.browser" : "server";
const pathParts = [];