Skip to content

Commit 1355177

Browse files
authored
Merge pull request #77 from akrantz/associate-master
use CustomFunctions.associate() instead of CustomFunctionsMapping
2 parents 92a47c1 + 99dfcec commit 1355177

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"office-ui-fabric-js": "^1.3.0"
2727
},
2828
"devDependencies": {
29-
"@types/custom-functions-runtime": "^1.4.7",
29+
"@types/custom-functions-runtime": "^1.4.8",
3030
"@types/es6-collections": "^0.5.29",
3131
"@types/es6-promise": "0.0.32",
3232
"@types/flux": "^3.1.0",

src/functions/functions.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,7 @@ function logMessage(message: string): string {
6363
* Defines the implementation of the custom functions
6464
* for the function id defined in the metadata file (functions.json).
6565
*/
66-
if (typeof(CustomFunctionMappings) !== "undefined") {
67-
CustomFunctionMappings.ADD = add;
68-
CustomFunctionMappings.CLOCK = clock;
69-
CustomFunctionMappings.INCREMENT = increment;
70-
CustomFunctionMappings.LOG = logMessage;
71-
}
66+
CustomFunctions.associate("ADD", add);
67+
CustomFunctions.associate("CLOCK", clock);
68+
CustomFunctions.associate("INCREMENT", increment);
69+
CustomFunctions.associate("LOG", logMessage);

0 commit comments

Comments
 (0)