backwards compatibility, reveal.js 4.0 can now register ~3.9 plugins
This commit is contained in:
parent
de50b4153c
commit
faaa791019
2
dist/reveal.es5.js
vendored
2
dist/reveal.es5.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.es5.js.map
vendored
2
dist/reveal.es5.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js
vendored
2
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js.map
vendored
2
dist/reveal.js.map
vendored
File diff suppressed because one or more lines are too long
@ -177,6 +177,13 @@ export default class Plugins {
|
|||||||
*/
|
*/
|
||||||
registerPlugin( plugin ) {
|
registerPlugin( plugin ) {
|
||||||
|
|
||||||
|
// Backwards compatibility to make reveal.js ~3.9.0
|
||||||
|
// plugins work with reveal.js 4.0.0
|
||||||
|
if( arguments.length === 2 && typeof arguments[0] === 'string' ) {
|
||||||
|
plugin = arguments[1];
|
||||||
|
plugin.id = arguments[0];
|
||||||
|
}
|
||||||
|
|
||||||
let id = plugin.id;
|
let id = plugin.id;
|
||||||
|
|
||||||
if( typeof id !== 'string' ) {
|
if( typeof id !== 'string' ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user