From 6ee6b299a4d1712167c0945b21954c93d64d58d3 Mon Sep 17 00:00:00 2001 From: Chris Loer Date: Thu, 22 Jun 2017 12:30:59 -0700 Subject: [PATCH] Fix issue #4859: allow loading RTL text plugin before first style load. --- src/source/rtl_text_plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/source/rtl_text_plugin.js b/src/source/rtl_text_plugin.js index 01646211457..d09aa48dd22 100644 --- a/src/source/rtl_text_plugin.js +++ b/src/source/rtl_text_plugin.js @@ -13,10 +13,10 @@ module.exports.evented = new Evented(); type ErrorCallback = (error: Error) => void; module.exports.registerForPluginAvailability = function( - callback: (pluginBlobURL: string, errorCallback: ErrorCallback) => void + callback: (args: {pluginBlobURL: string, errorCallback: ErrorCallback}) => void ) { if (pluginBlobURL) { - callback(pluginBlobURL, module.exports.errorCallback); + callback({ pluginBlobURL: pluginBlobURL, errorCallback: module.exports.errorCallback}); } else { module.exports.evented.once('pluginAvailable', callback); }